Neos\Flow\Core\Bootstrap::getActiveRequestHandler PHP Method

getActiveRequestHandler() public method

Returns the request handler (if any) which is currently handling the request.
public getActiveRequestHandler ( ) : Neos\Flow\Core\RequestHandlerInterface
return Neos\Flow\Core\RequestHandlerInterface
    public function getActiveRequestHandler()
    {
        return $this->activeRequestHandler;
    }

Usage Example

 /**
  * @return Domain
  */
 public function findOneByActiveRequest()
 {
     $matchingDomain = null;
     $activeRequestHandler = $this->bootstrap->getActiveRequestHandler();
     if ($activeRequestHandler instanceof HttpRequestHandlerInterface) {
         $matchingDomain = $this->findOneByHost($activeRequestHandler->getHttpRequest()->getUri()->getHost(), true);
     }
     return $matchingDomain;
 }
All Usage Examples Of Neos\Flow\Core\Bootstrap::getActiveRequestHandler