Example #1
0
 /**
  * Get an associated model, helper or data-value (in that order).
  * @param string $name Name of model/helper or key for data-value.
  * @return Model|Helper|mixed Associated value.
  */
 public function __get($name)
 {
     if (isset($this->modelObjects[$name])) {
         return $this->modelObjects[$name];
     }
     if (isset($this->view->data->{$name})) {
         return $this->view->data->{$name};
     }
     return parent::__get($name);
 }