Пример #1
0
 public function dispatch(RequestFactoryInterface $requestFactory)
 {
     $uri = $requestFactory->get()->toArray();
     $helper = DispatcherHelper::getHelper($uri);
     $builtRequest = $this->getBuilder()->controller($helper->getController())->action($helper->getAction())->parameters($helper->getParameters())->build();
     $controllerInstance = ClassUtils::load($builtRequest->controller, array($requestFactory->get()));
     return $this->invoke($controllerInstance, $builtRequest->action, $builtRequest->parameters);
 }
 public function testShouldInstantiateClass()
 {
     $result = ClassUtils::load('ApplicationRegistry');
     $this->assertThat($result, $this->logicalNot($this->isNull()));
 }