/** * Magic __call method * * @param string $name * @param array $args * @return mixed */ public function __call($name, $args) { if (is_object($this->object)) { $callback = new Callback(array($this->object, $name)); if ($callback->check()) { return $callback->run($args); } } return parent::__call($name, $args); }
/** * Конструктор * * @param array $options */ public function __construct($options = array()) { parent::__construct($options); $this->render && hook($this->render, array($this, 'show')); }
/** * Magic __get method * * @param string $name * @return mixed */ public function __get($name) { return isset($this->{$name}) ? $this->{$name} : parent::__get($name); }