Example #1
0
 public function setSiteAccess()
 {
     // init session
     $this->serviceManager->get('session');
     // set user context
     $container = new Container('initialized');
     $this->serviceManager->setService('user', new User($container->userId));
     $this->siteAccess = SiteaccessFactory::factory($this->serviceManager, $this->routeMatch->getParam('context'));
     return $this;
 }
Example #2
0
 public function dispatch(Request $request, Response $response = null, $routeMatch)
 {
     $siteAccess = SiteaccessFactory::factory($this->getServiceManager(), $routeMatch->getParam('context'));
     return $siteAccess->getResponse($this->getServiceManager(), $routeMatch->getParam('path'));
 }