config = \Zend_Registry::get('config'); if(empty($db)) { $this->db = \Zend_Registry::get('db'); }else{ $this->db = $db; } if(empty($auth)) { $this->auth = \Zend_Auth::getInstance(); if($this->auth->hasIdentity()) { $this->user = $this->auth->getIdentity(); } }else{ $this->auth = false; } } public function getCode() { } }