/** * Returns an iterable list of children. * * @return array */ function parameters() { $parameters = parent::parameters(); if (!isset($parameters['VALUE']) && in_array($this->name, ['URL', 'PHOTO'])) { // If we are encoding a URI value, and this URI value has no // VALUE=URI parameter, we add it anyway. // // This is not required by any spec, but both Apple iCal and Apple // AddressBook (at least in version 10.8) will trip over this if // this is not set, and so it improves compatibility. // // See Issue #227 and #235 $parameters['VALUE'] = new Parameter($this->root, 'VALUE', 'URI'); } return $parameters; }
/** * Hydrate data from a XML subtree, as it would appear in a xCard or xCal * object. * * @param array $value * * @return void */ function setXmlValue(array $value) { $value = array_map(function ($value) { return str_replace(':', '', $value); }, $value); parent::setXmlValue($value); }