Ejemplo n.º 1
0
 public function __construct()
 {
     parent::__construct();
     $di = \Phalcon\DI::getDefault();
     $this->setDI($di);
 }
Ejemplo n.º 2
0
 /**
  * Returns the internal event manager
  *
  * @return \Phalcon\Events\ManagerInterface 
  */
 public function getEventsManager()
 {
     if (!is_object(parent::getEventsManager())) {
         $em = $this->getUserOption('eventsManager');
         if (!is_object($em)) {
             $em = new EventsManager();
         }
         $em->enablePriorities(true);
         $this->setEventsManager($em);
     }
     return parent::getEventsManager();
 }
Ejemplo n.º 3
0
 public function __construct()
 {
     $config = Injectable::getDI()->getConfig();
     $this->index = $config->elasticsearch->index;
     $this->type = $config->elasticsearch->type;
 }