View
extends View
in package
Tags
Table of Contents
Properties
- $decorators : array<int, ViewDecoratorInterface>>
- View Decorators are class methods that will be run in sequence to have a chance to alter the generated output just prior to caching the results.
- $filters : array<string, string>
- Parser Filters map a filter name with any PHP callable. When the Parser prepares a variable for display, it will chain it through the filters in the order defined, inserting any parameters.
- $plugins : array<string, callable|array<int, string>|string>
- Parser Plugins provide a way to extend the functionality provided by the core Parser by creating aliases that will be replaced with any callable. Can be single or tag pair.
- $saveData : bool
- When false, the view method will clear the data between each call. This keeps your data safe and ensures there is no accidental leaking between calls, so you would need to explicitly pass the data to each view. You might prefer to have the data stick around between calls so that it is available to all views. If that is the case, set $saveData to true.
Properties
$decorators
View Decorators are class methods that will be run in sequence to have a chance to alter the generated output just prior to caching the results.
public
array<int, ViewDecoratorInterface>>
$decorators
= []
All classes must implement CodeIgniter\View\ViewDecoratorInterface
$filters
Parser Filters map a filter name with any PHP callable. When the Parser prepares a variable for display, it will chain it through the filters in the order defined, inserting any parameters.
public
array<string, string>
$filters
= []
To prevent potential abuse, all filters MUST be defined here in order for them to be available for use within the Parser.
Examples: { title|esc(js) } { created_on|date(Y-m-d)|esc(attr) }
Tags
$plugins
Parser Plugins provide a way to extend the functionality provided by the core Parser by creating aliases that will be replaced with any callable. Can be single or tag pair.
public
array<string, callable|array<int, string>|string>
$plugins
= []
Tags
$saveData
When false, the view method will clear the data between each call. This keeps your data safe and ensures there is no accidental leaking between calls, so you would need to explicitly pass the data to each view. You might prefer to have the data stick around between calls so that it is available to all views. If that is the case, set $saveData to true.
public
bool
$saveData
= true