Exemple #1
0
 public static function whetherLogout(AbstractActionController $controllerClass)
 {
     $request = $controllerClass->getRequest();
     if ($request->isGet() && $request->getQuery()->offsetGet('logout')) {
         $auth = new AuthenticationService();
         $auth->getStorage()->clear();
     }
 }
 /**
  * Возвращает запрос
  *
  * @return HttpRequest
  * @throws Exception\InvalidArgumentException
  */
 public function getRequest()
 {
     $request = parent::getRequest();
     if (!$request instanceof HttpRequest) {
         $errMsg = 'Request no http';
         throw new Exception\InvalidArgumentException($errMsg);
     }
     return $request;
 }
 /**
  * @return \Zend\Http\Request
  */
 public function getRequest()
 {
     return parent::getRequest();
 }