Пример #1
0
 public function __get($name)
 {
     if ($this->getDI()->has($name)) {
         return parent::__get($name);
     }
     return $this->{lcfirst(\Phalcon\Text::camelize("get_{$name}"))}();
 }
Пример #2
0
 /**
  * Returns the internal dependency injector
  *
  * @return \Phalcon\DiInterface
  */
 public function getDI()
 {
     if (!($di = parent::getDI()) && !$di instanceof DiInterface) {
         throw new \RuntimeException('A dependency injection object is required to access internal services');
     }
     return $di;
 }