/** * Add a property value to an existing property if it exists * * @access protected * @param string $name The name of the property to which to add the value * @param string $value The value to add to the property * @param bool $match_param If multiple properties with the name are present, we don't know for sure to which to add the new value * If set to true, the function will check for matching parameters when selecting the property to which to add */ protected function addPropertyValue($name, $value, $match_param = null) { require_once 'File/iCal/Property.php'; if (in_array($name, $this->_properties_possible)) { $pn = File_iCal_Property::getClassName($name); if (in_array($name, $this->_properties_single)) { foreach ($this->_properties as $p) { if (is_a($p, $pn)) { return $p->addValue($value); } } } else { if (in_array($name, $this->_properties_multiple)) { foreach ($this->_properties as $p) { if (is_a($p, $pn)) { //match the $match_param here //ignore for now return $p->addValue($value); } } } } } else { trigger_error("The property {$name} is not allowed for component " . $this->_name, E_USER_WARNING); } }