Example #1
0
 /**
  * @param Nomad_View    $view
  * @param Nomad_Request $request
  */
 public function __construct(Nomad_View $view, Nomad_Request $request)
 {
     $this->request = $request;
     $this->view = $view;
     //Check permissions on the controller level (if Nomad_GateKeeper is present)
     $application = Nomad_Application::getInstance();
     if (isset($application->Nomad_GateKeeper)) {
         $controllerName = $request->getController() . 'Controller';
         $pageName = $request->getPage() . 'Page';
         if (!Nomad_GateKeeper::getNomad_GateKeeper()->checkPermissions($controllerName, $pageName)) {
             $application->halt(403);
         }
     }
 }
Example #2
0
 /**
  * Returns the current routed controller/page
  * @return string
  */
 public function getCurrentUrlRoute()
 {
     return strtolower($this->_request->getController() . DS . $this->_request->getPage());
 }