/**
* Returns the value of the given property; throws
* InvalidPropertyHandlerException if the property didn't exist.
*
* @param string $p_property
* @return mixed
*/
public function __get($p_property)
{
$p_property = MetaAction::TranslateProperty($p_property);
if ($p_property == 'defined') {
return $this->defined();
}
if ($p_property == 'is_error') {
return PEAR::isError($this->m_error);
}
if ($p_property == 'error_code') {
return PEAR::isError($this->m_error) ? $this->m_error->getCode() : null;
}
if ($p_property == 'error_message') {
return PEAR::isError($this->m_error) ? $this->m_error->getMessage() : null;
}
if ($p_property == 'ok') {
return $this->getError() === ACTION_OK;
}
if ($p_property == 'name') {
return $this->m_name;
}
if (!is_array($this->m_properties)
|| !array_key_exists($p_property, $this->m_properties)) {
$this->trigger_invalid_property_error($p_property);
}
if (is_string($this->m_properties[$p_property])
&& method_exists($this, $this->m_properties[$p_property])) {
$methodName = $this->m_properties[$p_property];
return $this->$methodName();
}
return $this->m_properties[$p_property];
} // fn __get