/**
  * Implements support for getting URLs, Tables and Views
  * @param string $name
  */
 public function __get($name)
 {
     if (substr($name, -3) === 'Url') {
         if (isset($this->_urls[substr($name, 0, -3)])) {
             return Yum::route($this->_urls[substr($name, 0, -3)]);
         }
     }
     if (substr($name, -4) === 'View') {
         if (isset($this->_views[substr($name, 0, -4)])) {
             return $this->_views[substr($name, 0, -4)];
         }
     }
     if (substr($name, -5) === 'Table') {
         if (isset($this->_tables[substr($name, 0, -5)])) {
             return $this->_tables[substr($name, 0, -5)];
         }
     }
     return parent::__get($name);
 }
Beispiel #2
0
 public function __get($name)
 {
     if (array_key_exists($name, $this->_config)) {
         return $this->_config[$name];
     } else {
         return parent::__get($name);
     }
 }