Method |
Description |
|
__construct ( $file = NULL, array $data = NULL, $env = 'default' ) |
Constructor |
|
__get ( $key ) : mixed |
Magic method. See get() |
|
__isset ( $key ) : boolean |
Magic method, determines if a variable is set and is not NULL. |
|
__set ( $key, $value ) : void |
Magic method, calls set() with the same parameters. |
|
__toString ( ) : string |
Magic method, returns the output of render(). If any exceptions are
thrown, the exception output will be returned instead. |
|
__unset ( $key ) : void |
Magic method, unsets a given variable. |
|
as_array ( ) : array |
Returns the final data plus global data merged as an array |
|
bind ( $key, &$value ) : View |
Assigns a value by reference. The benefit of binding is that values can
be altered without re-setting them. It is also possible to bind variables
before they have values. Assigned values will be available as a
variable within the view file: |
|
bind_global ( $key, &$value ) : View |
Assigns a global variable by reference, similar to the bind() method. |
|
environment ( ) : Twig_Environment |
Returns the environment this view is attached to |
|
extension ( ) : string |
Returns the template's extension |
|
factory ( string $file = NULL, string $data = NULL, string $env = 'default' ) : void |
Factory for Twigs |
|
filename ( ) : string |
Returns the templates filename (sans extension) |
|
get ( $key, $default = NULL ) : mixed |
Searches for the given variable and returns its value. |
|
path ( ) : string |
Returns the full path of the current template ($filename + $extension) |
|
render ( $file = NULL ) : string |
Renders the view object to a string. Global and local data are merged
and extracted to create local variables within the view file. |
|
set ( $key, $value = NULL ) : View |
Assigns a variable by name. Assigned values will be available as a
variable within the view file: |
|
set_extension ( string $extension ) : void |
Sets a file exension |
|
set_filename ( $file ) : View |
Sets the view filename. |
|
set_global ( $key, $value = NULL ) : View |
Sets a global variable, similar to the set() method. |
|