本文整理汇总了PHP中Zend\Session\Container::getManager方法的典型用法代码示例。如果您正苦于以下问题:PHP Container::getManager方法的具体用法?PHP Container::getManager怎么用?PHP Container::getManager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend\Session\Container
的用法示例。
在下文中一共展示了Container::getManager方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: logoutAction
public function logoutAction()
{
$session = new Container('User');
$session->getManager()->destroy();
$this->getAuthService()->clearIdentity();
return $this->redirect()->toRoute('login');
}
示例2: tearDown
public function tearDown()
{
$this->sessionProgress->getManager()->getStorage()->clear('progress_tracker');
$forms = new Container('forms');
$forms->getManager()->getStorage()->clear('forms');
parent::tearDown();
}
示例3: reset
public function reset()
{
$clearance = new Container('forrest');
$clearance->getManager()->getStorage()->clear('forrest');
$this->forrest = new Container('forrest');
$this->forrest->trace = new \ArrayObject();
}
示例4: logoutAction
public function logoutAction()
{
$this->getAuthService()->getStorage()->clear();
$user_session = new Container('webshop');
$user_session->getManager()->destroy();
return $this->redirect()->toRoute('webshop/product');
}
示例5: logoutAction
public function logoutAction()
{
$session = new Container('User');
$session->getManager()->destroy();
$this->getAuthService()->clearIdentity();
return $this->redirect()->toUrl('/article_to_read/public');
}
示例6: loginAction
public function loginAction()
{
$sessao = new Container();
$id = $this->params()->fromRoute("id") ? $this->params()->fromRoute("id") : null;
$request = $this->getRequest();
if (empty($sessao->usuario)) {
if ($request->isPost()) {
$senha = $request->getPost('senha');
$usuario = $request->getPost('usuario');
if (!empty($senha) && !empty($usuario)) {
$user = new Login();
$user = $this->getLoginTable()->getLogin($usuario, $senha);
if (!$user) {
$this->redirect()->toRoute('errologin');
} else {
$sessao->usuario = $usuario;
$sessao->registro = time();
$this->redirect()->toRoute('dashboard');
}
}
}
} else {
if (!isset($id)) {
$this->redirect()->toRoute('dashboard');
} else {
$sessao->getManager()->getStorage()->clear();
$this->redirect()->toRoute('login');
}
}
}
示例7: indexAction
public function indexAction()
{
$userSession = new Container('user');
/*$userSession->user_id = false;
$userSession->user_group = false;*/
$userSession->getManager()->destroy();
return $this->redirect()->toRoute('home');
}
示例8: logoutAction
public function logoutAction()
{
$authService = $this->getServiceLocator()->get('AuthService');
$session = new Container('User');
$session->getManager()->destroy();
$authService->clearIdentity();
return $this->redirect()->toUrl('/login');
}
示例9: logoutAction
function logoutAction()
{
$adminState = new Container('Admin');
if (!is_null($adminState->Email)) {
$adminState->getManager()->getStorage()->clear('Admin');
}
$this->redirect()->toRoute('admin');
}
示例10: resetAction
/**
* Start over with the upgrade process in case of an error.
*
* @return mixed
*/
public function resetAction()
{
foreach (array_keys($this->cookie->getAllValues()) as $k) {
unset($this->cookie->{$k});
}
$storage = $this->session->getManager()->getStorage();
$storage[$this->session->getName()] = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS);
return $this->forwardTo('Upgrade', 'Home');
}
示例11: logoutAction
public function logoutAction()
{
// Clear the identity and we also regenerate a new session id in order to make sure that new logins always
// have a unique session id.
$this->authenticationService->clearIdentity();
$this->authSession->getManager()->expireSessionCookie();
$this->resetTwoFactorAuthentication();
return $this->redirect()->toRoute('login');
}
示例12: reset
public function reset()
{
$clearance = new Container('forrest');
$clearance->getManager()->getStorage()->clear('forrest');
$this->forrest = new Container('forrest');
$this->forrest->active = 'fallback';
$id = $this->getId();
$this->forrest->{$id} = new \ArrayObject();
}
示例13: logoutAction
public function logoutAction()
{
$this->login->logout();
$sesion = new Container('reminderSesion');
$sesion->getManager()->getStorage()->clear('reminderSesion');
//$this->logger->info("Usuario desconectado: " . $this->login->getIdentity());
//$this->flashMessengerPlus()->addSuccess('Logout Correcto!', 'Logout Correcto', false, null);
return $this->redirect()->toRoute('login', array('controller' => 'login', 'action' => 'index'));
}
示例14: deleteSession
public function deleteSession($username, $session, $ip)
{
if ($session == NULL) {
$this->tableGateway->delete(array('username' => $username));
} else {
$this->tableGateway->delete(array('username' => $username, 'session' => $session, 'ip' => $ip));
}
$user_session = new Container('user');
$user_session->getManager()->getStorage()->clear('user');
}
示例15: checkOutAction
public function checkOutAction()
{
if ($this->request->isPost()) {
$this->_options['tableName'] = "shopOrderTable";
$this->getTable()->saveItem($this->_mainParam['data']);
$ssOrder = new Container(BOOKONLINE_KEY . "_order");
$ssOrder->getManager()->getStorage()->clear(BOOKONLINE_KEY . "_order");
}
return $this->redirect()->toRoute("homeShop");
}