/**
  * Channel properties to the inner object
  * 
  * @param type $name
  * @return type 
  */
 public function __get($name)
 {
     try {
         // try to get property of the inner object
         return $this->proxy('getProperty', $name);
     } catch (Exception $e) {
         // check for property in the proxy...
         return parent::__get($name);
     }
 }
示例#2
0
 /**
  * Property getters handler
  * @param string $name Property name
  * @return mixed Property value
  * @throws \DomainException
  * @see Controller::__get()
  */
 public function __get($name)
 {
     switch ($name) {
         case 'controller':
         case 'action':
         case 'view':
             $attr = "_{$name}";
             return $this->{$attr};
         default:
             return parent::__get($name);
     }
 }
示例#3
0
 /**
  * Property getters handler
  * @param string $name Property name
  * @return mixed Property value
  * @throws \SNTools\PropertyException
  * @see Component::__get()
  */
 public function __get($name)
 {
     switch ($name) {
         case 'module':
             return $this->_module;
         case 'action':
         case 'view':
             return $this->route->{$name};
         default:
             return parent::__get($name);
     }
 }
示例#4
0
 /**
  * Method to lazy load classes
  *
  * @return Object
  */
 public function __get($name)
 {
     switch ($name) {
         case '_CroogoPlugin':
         case '_CroogoTheme':
             if (!isset($this->{$name})) {
                 $class = substr($name, 1);
                 $this->{$name} = new $class();
                 if (method_exists($this->{$name}, 'setController')) {
                     $this->{$name}->setController($this->_controller);
                 }
             }
             return $this->{$name};
         default:
             return parent::__get($name);
     }
 }