/** * Getter * Returns given attribute if it exists. Will throw an exception otherwise. * All "classic" attributes can be used (See {@link eZContentObjectAttribute::definition()}). * You can also use "serializedXML" to get the serialized version of the attribute through the eZPackage mechanism * @param $name * @throws ezcBasePropertyNotFoundException * @return mixed */ public function __get($name) { $ret = null; switch ($name) { // returns the serialized version of the attribute through the eZPackage mechanism case 'serializedXML': $ret = $this->attribute->serialize(new eZPackage()); break; case 'identifier': $ret = $this->identifier; default: if ($this->attribute->hasAttribute($name)) { $ret = $this->attribute->attribute($name); } else { throw new ezcBasePropertyNotFoundException($name); } } return $ret; }