Class TemplateRoute
Template Route Handler.
A route handler is a simple invokale
object with the signature:
__invoke(Container $container, RequestInterface $request, ResponseInterface $response)
It is only called (invoked) when a route is matched.
This is the default "Slim Route Handler" for template style routes.
It uses a TemplateRouteConfig
to properly either:
- redirect the request, if explicitely set
- load and render a "Template" object
Templates can be any objects that can be loaded with a "TemplateFactory".
The Template Factory used is an external dependency (template/factory
) expected to be set on the container.
Template-level cache is possible by setting the "cache" config option to true. Cached template can not have any options; they will always return the exact same content for all "template".
- Charcoal\App\Route\TemplateRoute implements Charcoal\Config\ConfigurableInterface, Charcoal\App\Route\RouteInterface uses Charcoal\Config\ConfigurableTrait (not available)
public
|
|
public
|
|
public
Psr\Http\Message\ResponseInterface
|
|
protected
string
|
|
protected
string
|
|
protected
string
|
|
protected
Slim\Http\Uri|null
|
|
protected
boolean
|
|
protected
integer
|
|
protected
string
|