Example #1
0
 public function __construct()
 {
     $users = Zend_Registry::get('login');
     //        echo "estas en el contruct de acl";
     //        Zend_Debug::dump($users);
     //        die();
     $this->_auth = Zend_Auth::getInstance();
     $this->_auth->setStorage(new Zend_Auth_Storage_Session($users->StorageSession));
     //        Zend_Debug::dump($this->_auth, "account", true);
     //        Zend_Debug::dump($_SESSION,"session");
     $this->_acl = Login_Model_Acl::getInstance();
 }
Example #2
0
 protected function _initAcl()
 {
     $users = Zend_Registry::get('login');
     $auth = Zend_Auth::getInstance();
     $auth->setStorage(new Zend_Auth_Storage_Session($users->StorageSession));
     //$acl = new Users_Model_Acl();
     $acl = Login_Model_Acl::getInstance();
     $front = Zend_Controller_Front::getInstance();
     //        $front->setParam('auth', $auth);
     //        $front->setParam('acl', $acl);
     require_once dirname(__FILE__) . '/controllers/plugin/Acl.php';
     //       Zend_Debug::dump($auth);
     //      Zend_Debug::dump($acl);
     //
     //       die();
     $front->registerPlugin(new Login_Controller_Plugin_Acl($auth, $acl));
     //$front->registerPlugin(new Users_Controller_Plu
 }
Example #3
0
 public static function getInstance()
 {
     if (null === self::$_instance) {
         self::$_instance = new self();
         self::$_instance->_initialize();
     }
     return self::$_instance;
 }