本文整理汇总了PHP中Zend_Auth::setStorage方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Auth::setStorage方法的具体用法?PHP Zend_Auth::setStorage怎么用?PHP Zend_Auth::setStorage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Auth
的用法示例。
在下文中一共展示了Zend_Auth::setStorage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
*
* @access public
* @return void
*/
public function __construct()
{
$this->_auth = Zend_Auth::getInstance();
$this->_config = Zend_Registry::get('config');
$session = 'Auth_' . ucfirst($this->_config->geral->appid);
$this->_auth->setStorage(new Zend_Auth_Storage_Session($session));
}
示例2: __construct
/**
*
*/
public function __construct()
{
$this->_auth = Zend_Auth::getInstance();
$this->_config = Zend_Registry::get('config');
//Namespace de autenticacao da aplicacao
$namespace = 'Auth_Admin_' . ucfirst($this->_config->general->appid);
//Define storage da aplicacao
$this->_auth->setStorage(new Zend_Auth_Storage_Session($namespace));
}
示例3: forceAuthenticate
public function forceAuthenticate($userUuid)
{
// Get a reference to the singleton instance of Zend_Auth
$this->_auth = Zend_Auth::getInstance();
// Set the storage interface
$this->_auth->setStorage(new Glo_Auth_Storage_Session('Glo_Auth'));
$storage = $this->_auth->getStorage();
$data = new stdClass();
$data->user_uuid = $userUuid;
$storage->write($data);
return;
}
示例4: __construct
/**
* Initialize namespace for auth
*/
public function __construct()
{
$this->_auth = Zend_Auth::getInstance();
$r = new ReflectionClass($this);
$this->_auth->setStorage(new Zend_Auth_Storage_Session('Zend_Auth_' . $r->getName()));
}
示例5: _generateAuthAdapter
/**
* Sets authentication up (used for auth changes such as the login)
*
* @return void
*/
protected function _generateAuthAdapter()
{
$this->_auth = Zend_Auth::getInstance();
$this->_auth->setStorage(new Zend_Auth_Storage_Session('RssProxy_Auth'));
$this->_authadapter = new Zend_Auth_Adapter_DbTable(Zend_Db_Table::getDefaultAdapter(), 'users', 'user_name', 'user_pass', 'SHA1(?)');
}