Property | Type | Description | |
---|---|---|---|
$__context | Standalone context | ||
$request | Request that created the controller | ||
$response | The response that will be returned from controller |
Property | Type | Description | |
---|---|---|---|
$_auto_render | Auto-render template after controller method returns | ||
$_environment | Twig_Environment | ||
$_template_path | Template path that points to the action view |
Method | Description | |
---|---|---|
__construct ( Request $request, Response $response ) : void | Creates a new controller instance. Each controller must be constructed with the request object that created it. | |
__get ( mixed $key ) : array | Have a standalone action context. A context should not be within a template because not all request require a template, thus, we allow the controller to handle the context for later manipulation. We use magic methods to manipulate the data: | |
__set ( string $key, mixed $value ) : mixed | Have a standalone action context. A context should not be within a template because not all request require a template, thus, we allow the controller to handle the context for later manipulation. We use magic methods to manipulate the data: | |
after ( ) : void | Renders the template if necessary | |
before ( ) : void | Before the action gets executed we need run a few processes. |
Method | Description | |
---|---|---|
_set_template_path ( string $path, string $file, string $extension = "html" ) : boolean | Load the path that points to the view (if applicable). |
public __construct ( Request $request, Response $response ) : void | ||
$request | Request | Request that created the controller |
$response | Response | The request's response |
return | void |
protected $_auto_render |
protected Twig_Environment $_environment | ||
return | Twig_Environment |
protected $_template_path |