Esempio n. 1
0
 public function testDefaultModule()
 {
     $dispatcher = $this->_controller->getDispatcher();
     $this->assertEquals($dispatcher->getDefaultModule(), $this->_controller->getDefaultModule());
     $this->_controller->setDefaultModule('foobar');
     $this->assertEquals('foobar', $this->_controller->getDefaultModule());
     $this->assertEquals($dispatcher->getDefaultModule(), $this->_controller->getDefaultModule());
 }
Esempio n. 2
0
File: Route.php Progetto: rexmac/zf2
 /**
  * Constructor
  *
  * @param Zend_Controller_Front $front Front Controller object
  * @param array $defaults Defaults for map variables with keys as variable names
  * @param array $responders Modules or controllers to receive RESTful routes
  */
 public function __construct(\Zend\Controller\Front $front, array $defaults = array(), array $responders = array())
 {
     $this->_defaults = $defaults;
     if ($responders) {
         $this->_parseResponders($responders);
     }
     $this->_front = $front;
     $this->_dispatcher = $front->getDispatcher();
 }