Beispiel #1
0
 /**
  *
  * @param string $uri
  * @throws \RuntimeException
  */
 protected function setURL($uri)
 {
     if ($this->URL) {
         throw new RuntimeException("setURL must be called only once");
     }
     if (!$this->siteStructure) {
         $this->siteStructure = $this->getSiteStructure();
     }
     PWELogger::info("=== %s %s", $_SERVER['REQUEST_METHOD'], $uri);
     PWELogger::debug("Request variables: %s", $_REQUEST);
     $this->URL = new PWEURL($uri, $this->siteStructure);
     if ($this->URL->getFailure()) {
         throw $this->URL->getFailure();
     }
     $node = $this->getNode();
     $this->setDisplayTemplate($node['!i']['template']);
     $this->jumpToFirstChild();
     /**
      * @var PWEUserAuthController
      */
     $authController = PWEUserAuthController::getAuthControllerInstance($this);
     if ($authController != null) {
         PWELogger::debug("Starting auth");
         $authController->handleAuth();
     } else {
         PWELogger::warn("No auth controller");
     }
     PWELogger::debug('Done auth');
 }
 public function __construct()
 {
     parent::__construct(new UnitTestPWECore());
 }