Пример #1
0
 /**
  * @throws InvalidRequestInfoImplementation
  */
 private function guardRequestInfoIsValid()
 {
     $requestInfo = $this->config->getRequestInfo();
     if (!$requestInfo instanceof ServesRequestInfo) {
         throw new InvalidRequestInfoImplementation();
     }
 }
Пример #2
0
 /**
  * @param ServesUriComponents $uriComponents
  * @param ServesRequestData   $request
  *
  * @return HandlesDomainRequests
  */
 private function getDomainRequestHandler(ServesUriComponents $uriComponents, ServesRequestData $request)
 {
     $domainNamespace = $this->config->getDomainNamespace();
     $requestInfo = $this->config->getRequestInfo();
     $builder = new DomainRequestHandlerBuilder($domainNamespace, $requestInfo->getMethod(), $uriComponents);
     $domainRequestHandler = $builder->buildDomainRequestHandler($request);
     return $domainRequestHandler;
 }
Пример #3
0
 /**
  * @param ServesIceHawkConfig $config
  */
 public function __construct(ServesIceHawkConfig $config)
 {
     $this->requestInfo = $config->getRequestInfo();
     $this->uriResolver = $config->getUriResolver();
     $this->uriRewriter = $config->getUriRewriter();
     $this->eventListeners = $config->getEventListeners();
     $this->domainNamespace = $config->getDomainNamespace();
 }
Пример #4
0
 /**
  * @param ServesIceHawkConfig $config
  * @param ControlsHandlingBehaviour $delegate
  */
 public function __construct(ServesIceHawkConfig $config, ControlsHandlingBehaviour $delegate)
 {
     $this->uriRewriter = $config->getUriRewriter();
     $this->uriResolver = $config->getUriResolver();
     $this->domainNamespace = $config->getDomainNamespace();
     $this->eventListeners = $config->getEventListeners();
     $this->requestInfo = $config->getRequestInfo();
     $this->delegate = $delegate;
 }