Example #1
0
 /**
  * Magic getter function
  * @param string $name of the attribute to get
  * @return mixed the attribute's value
  */
 public function __get($name)
 {
     $c = Request::camelize($name);
     $m = "get{$c}";
     if (method_exists($this, $m)) {
         return $this->{$m}();
     } else {
         return $this->defaultRequest->__get($name);
     }
 }