HttpViewControllerFactory

Implements \HttpViewControllerFactoryInterface

Class HttpViewControllerFactory

category

System

package

Http

subpackage

Factories

implements

HttpViewControllerFactoryInterface

Methods

Initialize the http view controller factory.

__construct(\HttpViewControllerRegistryInterface $httpViewControllerRegistry, \HttpContextReaderInterface $httpContextReader, \HttpResponseProcessorInterface $httpResponseProcessor) 

Arguments

$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.

Creates a new instance of a http view controller by the given controller name.

createController(string $controllerName) : \HttpViewControllerInterface
Throws
\LogicException

If the controller is not registered in the http view controller registry or the controller does not implement the http view controller interface.

Arguments

$controllerName

string

Expected name of controller (without 'Controller'-Suffix)

Response

\HttpViewControllerInterface

Created controller instance.

Properties