$className */ public function __construct($className) { $this->_entityName = $className; } /** * Adds metadata to a property of the class. * * @param string $fieldName * @param array $fieldMetadata */ public function addFieldMetadata($fieldName, array $fieldMetadata) { $this->_fieldMetadata[$fieldName] = array_merge( isset($this->_fieldMetadata[$fieldName]) ? $this->_fieldMetadata[$fieldName] : array(), $fieldMetadata); } /** * * * @param $fieldName * @param $metadata */ public function setFieldMetadata($fieldName, array $metadata) { $this->_fieldMetadata[$fieldName] = $metadata; } /** * * @param $fieldName * @param $metadataKey * @param $value */ public function setFieldMetadataEntry($fieldName, $metadataKey, $value) { $this->_fieldMetadata[$fieldName][$metadataKey] = $value; } /** * Gets metadata of a property of the class. * * @param string $fieldName * @param string $metadataKey * @return mixed */ public function getFieldMetadata($fieldName) { return $this->_fieldMetadata[$fieldName]; } /** * * @param $fieldName * @param $metadataKey * @return */ public function getFieldMetadataEntry($fieldName, $metadataKey) { return isset($this->_fieldMetadata[$fieldName][$metadataKey]) ? $this->_fieldMetadata[$fieldName][$metadataKey] : null; } /** * Gets metadata of the class. * * @param string $metadataKey * @return mixed */ public function getClassMetadata() { return $this->_classMetadata; } /** * * * @param $metadataKey */ public function getClassMetadataEntry($metadataKey) { return isset($this->_classMetadata[$metadataKey]) ? $this->_classMetadata[$metadataKey] : null; } /** * Adds metadata to the class. * * @param array $classMetadata */ public function addClassMetadata(array $classMetadata) { $this->_classMetadata = array_merge($this->_classMetadata, $classMetadata); } /** * * * @param $metadata */ public function setClassMetadata(array $metadata) { $this->_classMetadata = $metadata; } /** * * @param $metadataKey * @param $value */ public function setClassMetadataEntry($metadataKey, $value) { $this->_classMetadata[$metadataKey] = $value; } } ?>