/** * Returns the value of the property $name. * * @throws ezcBasePropertyNotFoundException if the property does not exist. * @param string $name * @ignore */ public function __get( $name ) { switch ( $name ) { case 'dataMap': { if ( isset( $this->object ) ) return $this->object->dataMap(); else return array(); } break; default: { if ( isset( $this->dataMap[$name] ) ) { return $this->dataMap[$name]->content(); } if ( !$this->object instanceof eZContentObject ) throw new ezcBaseInvalidParentClassException( 'eZContentObject', $this->object ); if ( $this->object->hasAttribute( $name ) ) return $this->object->attribute( $name ); throw new ezcBasePropertyNotFoundException( '->object->attribute( ' . $name . ' )' ); } } }
function hasAttribute($attr) { return in_array($attr, $this->LocalAttributeNameList) || eZContentObject::hasAttribute($attr); }
/** * Check if given attribute exists. * All "classic" attributes can be used (See {@link eZContentObject::definition()}). * @param $name * @return bool */ public function __isset($name) { return $this->contentObject->hasAttribute($name); }