Example #1
0
 /**
  * Initializes the router.
  *
  * @throws BootstrapException
  * @throws \Exception
  */
 public function initializeRouter()
 {
     try {
         // initialize router
         $this->router = Router::getInstance();
         // if a route is matched, a dispatcher instance is returned, and the callback is issued
         $this->router->initializeRouter()->issueCallback();
     } catch (BootstrapException $e) {
         throw $e;
     }
 }
Example #2
0
 /**
  * @expectedExceptionMessage The provided callback class
  * @expectedException \Webiny\Component\Bootstrap\BootstrapException
  */
 public function testMvcRouterException()
 {
     \Webiny\Component\Bootstrap\Router::getInstance()->mvcRouter('/invalid-module/my-ctrl/my-act/');
 }