db = \Zend_Registry::get('db'); }else{ $this->db = $db; } $this->config = \Zend_Registry::get('config'); $Listener = new Listener(); @$this->events()->attachAggregate($Listener); $this->table = new \Helpers\Table(); } public function events(\Zend_EventManager_EventCollection $events = NULL) { if ($events !== NULL) { $this->events = $events; } elseif ($this->events === NULL) { $this->events = new \Zend_EventManager_EventManager(__CLASS__); } return $this->events; } public function clientCredentials() { } }