alex77
Новичок
простой вопрос по ZF
Здравствуйте.
Разбирая код ZF увидел следующее:
строка
для чего фигурные скобки?
тут http://php.net/manual/en/language.types.string.php есть подобное
а где про вызов методов таким способом ?
Здравствуйте.
Разбирая код ZF увидел следующее:
PHP:
/**
* __get() - Get a property via property call $metadata->foo
*
* @param string $name
* @return mixed
*/
public function __get($name)
{
if (method_exists($this, 'get' . $name)) {
return $this->{'get' . $name}();
} elseif (array_key_exists($name, $this->_dynamicAttributes)) {
return $this->_dynamicAttributes[$name];
} else {
require_once 'Zend/Tool/Framework/Registry/Exception.php';
throw new Zend_Tool_Framework_Registry_Exception('Property ' . $name . ' was not located in this metadata.');
}
}
PHP:
$this->{'get' . $name}();
тут http://php.net/manual/en/language.types.string.php есть подобное
а где про вызов методов таким способом ?