Example #1
1
 /**
  * Overriding parent
  *
  * @param string $name
  * @return mixed
  */
 public function __get($name)
 {
     // View
     if ($name == 'view') {
         return $this->_controllerInstance->getView();
     }
     // Request
     if ($name == 'request') {
         return $this->_controllerInstance->getRequest();
     }
     // Response
     if ($name == 'response') {
         return $this->_controllerInstance->getResponse();
     }
     // POST
     if ($name == 'post') {
         return $this->_controllerInstance->getRequest()->getPost();
     }
     // GET
     if ($name == 'query') {
         return $this->_controllerInstance->getRequest()->getQuery();
     }
     // URL parameters
     if ($name == 'params') {
         return $this->_controllerInstance->getRequest()->getParams();
     }
     // application env
     if ($name == 'appEnv') {
         return $this->_controllerInstance->getAppEnv();
     }
     parent::__get($name);
 }