View
class View (View source)
Constants
| UNSAFE |
|
Methods
Set encoding used by escape engine
Enables or disables strict mode to pre-check for the existence of the view.
Force the View::render method to render at the time it is called
Starts rendering of registered views.
Share or remove shared data to Views, shared variables will be added as variables to the views that will be executed later
Check if view exists in ./application/View/ folder
Register or render a View. If View is registered this method returns the index number from View
This method is similar to ::render(), except that the view will only be rendered once,
ignoring subsequent calls.
Remove a registered View by index
Details
static
setEncoding($value)
Set encoding used by escape engine
static bool
strict(bool $enable)
Enables or disables strict mode to pre-check for the existence of the view.
- Note: When enabled, it performs a case-sensitive check on systems that do not support it
- Note: In development environment, the framework will enable this by default
- Note: In production environment, it is recommended to disable it for performance reasons
static
forceRender()
Force the View::render method to render at the time it is called
static
dispatch()
Starts rendering of registered views.
Executes all registered views and forces immediate rendering for subsequent calls.
static
data(string $key, mixed $value)
Share or remove shared data to Views, shared variables will be added as variables to the views that will be executed later
static bool
exists(string $view)
Check if view exists in ./application/View/ folder
static int|null
render(string $view, array $data = array(), int $mode = null)
Register or render a View. If View is registered this method returns the index number from View
static
once(string $view, array $data = array(), int $mode = ENT_COMPAT)
This method is similar to ::render(), except that the view will only be rendered once,
ignoring subsequent calls.
static
remove(int $index)
Remove a registered View by index