public function __get($property)
{
if (count($this->getPropertiesMap()) > 0) {
$map = $this->getPropertiesMap();
if (array_key_exists($property, $map)) {
$methodName = $map[$property];
if (method_exists($this, $methodName)) {
return $this->{$methodName}();
} elseif (method_exists($this->dataObject, $methodName)) {
return $this->dataObject->{$methodName}();
}
}
throw new \LogicException("Undefined " . $property . " property.");
}
$methodName = 'get' . \Doctrine\Common\Util\Inflector::classify($property);
if (method_exists($this, $methodName)) {
return $this->{$methodName}();
} elseif (property_exists($this, $property)) {
return $this->{$property};
} elseif (method_exists($this->dataObject, $methodName)) {
return $this->dataObject->{$methodName}();
} elseif (property_exists($this->dataObject, $property)) {
return $this->dataObject->{$property};
}
throw new \LogicException("Undefined " . $methodName . " method or missing " . $property . " property.");
}