             $currentRouteName = $e->getRouteMatch()->getMatchedRouteName();             $allowed = array(                 'admin/login',                 'admin/',             );             if (in_array($currentRouteName, $allowed)) {                 return;             }             if (!$auth->hasIdentity()) {                 $url = $e->getRouter()->assemble(array(),                                                  array('name' => 'admin/login'));                 $response = $e->getResponse();                 $response->getHeaders()->addHeaderLine('Location', $url);                 $response->setStatusCode(000);                 $response->sendHeaders();             }         }); }