Пример #1
0
 public function get($property, $default = null)
 {
     if (method_exists($this, 'get' . ucfirst($property))) {
         //Getter
         if (isset($this->_cache) && is_object($this->_cache) && isset($this->_cache->{$property})) {
             return $this->_cache->{$property};
         }
         $method = 'get' . ucfirst($property);
         $res = self::$method($default);
         $this->setCache($property, $res);
         return $res;
     }
     if (strpos($property, '.')) {
         //External object !
         $p = explode('.', $property);
         $class = 'BidsHelper' . ucfirst($p[0]) . 'Auction';
         array_shift($p);
         if (count($p) == 1) {
             $p = $p[0];
         }
         if (class_exists($class)) {
             return call_user_func(array($class, 'get'), $this, $p);
         }
     }
     return parent::get($property, $default);
 }