lithium\template\View::__construct()
Overrides
lithium\core\Object::__construct()
Constructor.
Parameters
-
array
$configClass configuration parameters The available options are:
'loader'mixed: Instance or name of the class used for locating and reading template content. Defaults toFile, which reads template content from PHP files.'renderer'mixed: Instance or name of the class that populates template content with the data passed in to the view layer, typically from a controller. Defaults to'File', which executes templates as standard PHP files, using path information returned from theloaderclass. Bothloaderandrendererclasses are looked up using the'adapter.template.view'path, which locates classes in theextensions\adapter\template\viewsub-namespace of an application or plugin.'request': TheRequestobject to be made available in the templates. Defaults tonull.'steps'array: The array of step configurations to add to the built-in configurations. Will be merged with the defaults, with any configurations passed in overwriting built-in steps. See the$_stepsproperty for more information.'processes'array: The array of process steps to add to the built-in configurations. Will be merged with the defaults, with any configurations passed in overwriting built-in processes. See the$_processesproperty for more information.'outputFilters'array: An array of filters to be used when handling output. By default, the class is initialized with one filter,h, which is used in automatic output escaping.
Returns
voidSource
public function __construct(array $config = array()) {
$defaults = array(
'request' => null,
'response' => null,
'loader' => 'File',
'renderer' => 'File',
'steps' => array(),
'processes' => array(),
'outputFilters' => array()
);
parent::__construct($config + $defaults);
}