\Charcoal\App\TemplateAbstractTemplate

Template (View Controller) base class

Summary

Methods
Properties
Constants
__construct()
init()
setDependencies()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(array|\ArrayAccess  $data = null) 

Parameters

array|\ArrayAccess $data

The dependencies (app and logger).

init()

init(\Psr\Http\Message\RequestInterface  $request) : boolean

Initialize the template with a request.

Parameters

\Psr\Http\Message\RequestInterface $request

The request to intialize.

Returns

boolean —

Success / Failure.

setDependencies()

setDependencies(\Pimple\Container  $container) : void

Give an opportunity to children classes to inject dependencies from a Pimple Container.

Does nothing by default, reimplement in children classes.

The $container DI-container (from Pimple) should not be saved or passed around, only to be used to inject dependencies (typically via setters).

Parameters

\Pimple\Container $container

A dependencies container instance.