Ejemplo n.º 1
0
 public function testSetURL_MidParams_JustBase()
 {
     $this->object->process('/midaccept/');
     $node = $this->object->getNode();
     $this->assertNull($node['!i']['marker']);
     $this->assertEquals("/midaccept:", $this->object->getContent());
 }
Ejemplo n.º 2
0
 /**
  * @param \PWE\Core\PWECore $pwe
  * @return PWEUserAuthController
  */
 public static function getAuthControllerInstance(PWECore $pwe)
 {
     try {
         $node = $pwe->getNode();
     } catch (HTTP5xxException $e) {
         PWELogger::warn('Failed to get pwe node in auth controller: %s', $e);
     }
     if (!isset($node['!i']['authController']) || $node['!i']['authController'] == 'none') {
         return new NoneAuthController($pwe);
     }
     if ($node['!i']['authController'] != NoneAuthController::getClassName()) {
         PWELogger::info('Page requires auth: %s', $node['!i']['authController']);
     }
     return new $node['!i']['authController']($pwe);
 }