phpDocumentor

HttpViewControllerFactory
in package
implements HttpViewControllerFactoryInterface

Class HttpViewControllerFactory

Tags
category

System

subpackage

Factories

implements

HttpViewControllerFactoryInterface

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

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

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
throws
HttpControllerException

When the content view does not implement the content view interface.

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
throws
HttpControllerException

When the found controller class does not implement the http view controller interface.

Return values
string

Class name of the http controller.

Search results