Exemple #1
0
 /**
  * Property getters handler
  * @param string $name Property name
  * @return mixed Property value
  * @throws \DomainException
  * @see Component::__get()
  */
 public function __get($name)
 {
     switch ($name) {
         case 'method':
             return $this->server['REQUEST_METHOD'];
         case 'uri':
             return $this->server['REQUEST_URI'];
         default:
             return parent::__get($name);
     }
 }
Exemple #2
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 'twig_dirs':
         case 'twig_options':
             $attr = "_{$name}";
             return $this->{$attr};
         default:
             return parent::__get($name);
     }
 }