◆ __construct()
__construct |
( |
protected string |
$template, |
|
|
protected Factory |
$factory, |
|
|
protected array |
$options = [] |
|
) |
| |
Constructor
- Parameters
-
string | $template | the path of the template. |
Factory | $factory | the factory creating this template |
array | $options | optional array of options |
◆ __get()
__get() is a magic method utilized for reading data from inaccessible members. In this class it is used to get attributes for the template in a comfortable way.
- Parameters
-
string | $name | the name of the member field |
- Returns
- mixed the value for the member field
- See also
- http://php.net/__get
◆ __isset()
__isset() is a magic method triggered by calling isset() or empty() on inaccessible members. In this class it is used to check for attributes for the template in a comfortable way.
- Parameters
-
string | $name | the name of the member field |
- Returns
- bool TRUE if that attribute exists, FALSE otherwise
- See also
- http://php.net/__isset
◆ __set()
__set |
( |
string |
$name, |
|
|
mixed |
$value |
|
) |
| |
__set() is a magic method run when writing data to inaccessible members. In this class it is used to set attributes for the template in a comfortable way.
- Parameters
-
string | $name | the name of the member field |
mixed | $value | the value for the member field |
- See also
- http://php.net/__set
◆ __unset()
__unset() is a magic method invoked when unset() is used on inaccessible members. In this class it is used to check for attributes for the template in a comfortable way.
- Parameters
-
string | $name | the name of the member field |
- See also
- http://php.net/__set
◆ _render()
Parse, render and return the presentation.
- Returns
- string A string representing the rendered presentation.
◆ clear_attribute()
clear_attribute |
( |
string |
$name | ) |
|
Clear an attribute associated with this template.
- Parameters
-
string | $name | The name of the attribute to be cleared. |
◆ clear_attributes()
Clear all attributes associated with this template.
◆ get_attribute()
get_attribute |
( |
string |
$name | ) |
|
Returns the value of an attribute.
- Parameters
-
string | $name | An attribute name. |
- Returns
- mixed An attribute value.
◆ get_attributes()
Set an array of attributes.
- Returns
- array An associative array of attributes and their associated values.
◆ get_layout()
Returns the template's layout.
- Returns
- Template|null
◆ render()
render |
( |
array |
$attributes = [] , |
|
|
string|Template |
$layout = null |
|
) |
| |
Parse, render and return the presentation.
- Parameters
-
array | $attributes | An optional associative array of attributes and their associated values. |
string | Template | null | $layout | A name of a layout template. |
- Returns
- string A string representing the rendered presentation.
- Exceptions
-
◆ set_attribute()
set_attribute |
( |
string |
$name, |
|
|
mixed |
$value |
|
) |
| |
Set an attribute.
- Parameters
-
string | $name | An attribute name. |
mixed | $value | An attribute value. |
◆ set_attributes()
set_attributes |
( |
array |
$attributes | ) |
|
Set an array of attributes.
- Parameters
-
array | $attributes | An associative array of attributes and their associated values. |
◆ set_layout()
set_layout |
( |
Template|string|null |
$layout | ) |
|
Set the template's layout.
- Parameters
-
Template | string | null | $layout | A name of a layout template or a layout template. |
- Exceptions
-
◆ $attributes
◆ $layout
The documentation for this class was generated from the following file: