Exemple #1
0
 public function __construct()
 {
     $this->autoloader =& AutoLoader::getInstance();
     $this->httpRequest =& HttpRequest::getInstance();
     // nothing here
 }
Exemple #2
0
 private function loadController()
 {
     $httpRequest = HttpRequest::getInstance();
     if ($httpRequest->arg(0) && $this->mod_exists(xsCleanLatinName($httpRequest->arg(0)), 'controllers')) {
         $this->controller = xsCleanLatinName($httpRequest->arg(0));
         if ($httpRequest->arg(1)) {
             $this->action = xsCleanLatinName($httpRequest->arg(1));
         } else {
             $this->action = $this->config['default_action'];
         }
     } else {
         $this->controller = $this->config['default_controller'];
         $this->action = $this->config['default_action'];
     }
     $this->params = $httpRequest->getParams();
     $this->load($this->controller, 'controllers');
 }
Exemple #3
0
 /**
  * @covers Xoops\Core\HttpRequest::getInstance
  * @todo   Implement testGetInstance().
  */
 public function testGetInstance()
 {
     $instance = HttpRequest::getInstance();
     $this->assertInstanceOf($this->myClass, $instance);
     $this->assertSame($instance, $this->object);
 }