Example #1
0
 public function __construct()
 {
     parent::__construct();
     $di = \Phalcon\DI::getDefault();
     $this->setDI($di);
 }
Example #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();
 }
Example #3
0
 public function __construct()
 {
     $config = Injectable::getDI()->getConfig();
     $this->index = $config->elasticsearch->index;
     $this->type = $config->elasticsearch->type;
 }