Horde_Icalendar_Vtodo::fromArray PHP Метод

fromArray() публичный Метод

Set the attributes for this todo item from an array.
public fromArray ( array $todo )
$todo array Array containing the details of the todo in the same format that toArray() exports.
    public function fromArray($todo)
    {
        if (isset($todo['name'])) {
            $this->setAttribute('SUMMARY', $todo['name']);
        }
        if (isset($todo['desc'])) {
            $this->setAttribute('DESCRIPTION', $todo['desc']);
        }
        if (isset($todo['priority'])) {
            $this->setAttribute('PRIORITY', $todo['priority']);
        }
        if (isset($todo['due'])) {
            $this->setAttribute('DTSTAMP', $todo['due']);
        }
    }