Horde_Icalendar_Vtodo::toArray PHP Метод

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

Convert this todo to an array of attributes.
public toArray ( ) : array
Результат array Array containing the details of the todo in a hash as used by Horde applications.
    public function toArray()
    {
        $todo = array();
        try {
            $name = $this->getAttribute('SUMMARY');
            if (!is_array($name)) {
                $todo['name'] = $name;
            }
        } catch (Horde_Icalendar_Exception $e) {
        }
        try {
            $desc = $this->getAttribute('DESCRIPTION');
            if (!is_array($desc)) {
                $todo['desc'] = $desc;
            }
        } catch (Horde_Icalendar_Exception $e) {
        }
        try {
            $priority = $this->getAttribute('PRIORITY');
            if (!is_array($priority)) {
                $todo['priority'] = $priority;
            }
        } catch (Horde_Icalendar_Exception $e) {
        }
        try {
            $due = $this->getAttribute('DTSTAMP');
            if (!is_array($due)) {
                $todo['due'] = $due;
            }
        } catch (Horde_Icalendar_Exception $e) {
        }
        return $todo;
    }