HttpViewControllerFactory
in package
implements
HttpViewControllerFactoryInterface
Class HttpViewControllerFactory
Tags
Interfaces, Classes and Traits
- HttpViewControllerFactoryInterface
- Interface HttpViewControllerFactoryInterface
Table of Contents
- $httpContextReader : HttpContextReaderInterface
- $httpResponseProcessor : HttpResponseProcessorInterface
- $httpViewControllerRegistry : HttpViewControllerRegistryInterface
- __construct() : mixed
- Initialize the http view controller factory.
- createController() : HttpViewControllerInterface
- Creates a new instance of a http view controller by the given controller name.
- _createControllerContentView() : ContentViewInterface
- Creates and returns the content view for a http view controller by the controller name.
- _getControllerClassName() : string
- Returns the class name of a http controller by the given controller name.
Properties
$httpContextReader
protected
HttpContextReaderInterface
$httpContextReader
$httpResponseProcessor
protected
HttpResponseProcessorInterface
$httpResponseProcessor
$httpViewControllerRegistry
protected
HttpViewControllerRegistryInterface
$httpViewControllerRegistry
Methods
__construct()
Initialize the http view controller factory.
public
__construct(HttpViewControllerRegistryInterface $httpViewControllerRegistry, HttpContextReaderInterface $httpContextReader, HttpResponseProcessorInterface $httpResponseProcessor) : mixed
Parameters
- $httpViewControllerRegistry : HttpViewControllerRegistryInterface
-
Object which holds the registered controller class names.
- $httpContextReader : HttpContextReaderInterface
-
Object to read the http context.
- $httpResponseProcessor : HttpResponseProcessorInterface
-
Object to process the http response.
Return values
mixed —createController()
Creates a new instance of a http view controller by the given controller name.
public
createController(string $controllerName) : HttpViewControllerInterface
Parameters
- $controllerName : string
-
Expected name of controller (without 'Controller'-Suffix)
Tags
Return values
HttpViewControllerInterface —Created controller instance.
_createControllerContentView()
Creates and returns the content view for a http view controller by the controller name.
protected
_createControllerContentView(string $controllerName) : ContentViewInterface
Parameters
- $controllerName : string
-
Name of the http controller class.
Tags
Return values
ContentViewInterface —Content view instance for the http view controller.
_getControllerClassName()
Returns the class name of a http controller by the given controller name.
protected
_getControllerClassName(string $controllerName) : string
Parameters
- $controllerName : string
-
Name of the http controller class.
Tags
Return values
string —Class name of the http controller.