本文整理匯總了PHP中Zend_Session::isDestroyed方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Session::isDestroyed方法的具體用法?PHP Zend_Session::isDestroyed怎麽用?PHP Zend_Session::isDestroyed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Session
的用法示例。
在下文中一共展示了Zend_Session::isDestroyed方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: preDispatch
/**
* preDispatch() - Check the access privilage of user.
*
* @param Zend_Controller_Request_Abstract $request
* @return boolean
* @throws Zend_Exception on access denied.
*/
public function preDispatch(Zend_Controller_Request_Abstract $request)
{
$actionName = strtolower($request->getActionName());
$controllerName = strtolower($request->getControllerName());
if (substr($actionName, 0, 4) == 'fill' or substr($actionName, 0, 3) == 'get' or 'authenticate' == strtolower($controllerName) or 'error' == strtolower($controllerName)) {
return;
}
if (!Zend_Session::isDestroyed()) {
self::initUserAcl();
self::check();
} else {
throw new Zend_Exception('Session is destroyed.', Zend_Log::WARN);
}
}
示例2: preDispatch
/**
* preDispatch() - Check the access privilage of user.
*
* @param Zend_Controller_Request_Abstract $request
* @return boolean
* @throws Zend_Exception on access denied.
*/
public function preDispatch()
{
$auth = Zend_Auth::getInstance();
$authId = $auth->getStorage()->read();
$request = self::getRequest();
$actionName = strtolower($request->getActionName());
$controllerName = strtolower($request->getControllerName());
if (substr($actionName, 0, 4) == 'fill' or substr($actionName, 0, 3) == 'get' or 'authenticate' == strtolower($controllerName) or 'error' == strtolower($controllerName)) {
return;
}
if (!Zend_Session::isDestroyed()) {
self::initUserAcl();
self::check();
} else {
throw new Zend_Exception('Session is destroyed.', Zend_Log::WARN);
}
}
示例3: dispatchLoopStartup
/**
* dispatchLoopStartup() - Check the access privilage of user.
*
* @param Zend_Controller_Request_Abstract $request
* @return boolean
* @throws Zend_Exception on access denied.
*/
public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
{
$actionName = strtolower($request->getActionName());
$controllerName = strtolower($request->getControllerName());
if (substr($actionName, 0, 4) == 'fill' or substr($actionName, 0, 3) == 'get' or 'authenticate' == strtolower($controllerName) or 'error' == strtolower($controllerName)) {
return;
}
$auth = Zend_Auth::getInstance();
if (!Zend_Session::isDestroyed()) {
if (!$auth->hasIdentity()) {
$guestAdapter = new Acadz_Resource_Acl_Guest();
$auth->authenticate($guestAdapter);
}
self::initUserAcl();
self::check();
} else {
throw new Zend_Exception('Session is destroyed.', Zend_Log::WARN);
}
}
示例4: logout
/**
* @return boolean
*/
public function logout()
{
Zend_Auth::getInstance()->clearIdentity();
// Comme il s'agit d'un intranet, nous pouvons supprimer complètement la session
if (!Zend_Session::isDestroyed()) {
Zend_Session::destroy();
}
return true;
}