Horde_Icalendar::toHash PHP Method

toHash() public method

Export this entry as a hash array with tag names as keys.
public toHash ( boolean $paramsInKeys = false ) : array
$paramsInKeys boolean If false, the operation can be quite lossy as the parameters are ignored when building the array keys. So if you export a vcard with LABEL;TYPE=WORK:foo LABEL;TYPE=HOME:bar the resulting hash contains only one label field! If set to true, array keys look like 'LABEL;TYPE=WORK'
return array A hash array with tag names as keys.
    public function toHash($paramsInKeys = false)
    {
        $hash = array();
        foreach ($this->_attributes as $a) {
            $k = $a['name'];
            if ($paramsInKeys && is_array($a['params'])) {
                foreach ($a['params'] as $p => $v) {
                    $k .= ";{$p}={$v}";
                }
            }
            $hash[$k] = $a['value'];
        }
        return $hash;
    }