本文整理匯總了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(?)');
}