◆ _render()
Parse, render and return the presentation.
- Returns
- string A string representing the rendered presentation.
- Exceptions
-
◆ render_partial()
render_partial |
( |
Template|string |
$partial, |
|
|
array |
$attributes = [] |
|
) |
| |
Parse, render and return the presentation of a partial template.
- Parameters
-
Template | string | $partial | A partial name or template |
array | $attributes | An optional associative array of attributes and their associated values. |
- Returns
- string A string representing the rendered presentation.
- Exceptions
-
◆ render_partial_collection()
render_partial_collection |
( |
string |
$partial, |
|
|
array |
$collection, |
|
|
Template|string|null |
$spacer = null , |
|
|
array |
$attributes = [] |
|
) |
| |
Renders a partial template with every member of a collection. This member can be accessed by a template variable with the same name as the name of the partial template.
Example:
template entry.php contains:
<?= $entry ?>
$entries = ['lorem', 'ipsum']; $template->render_partial_collection('entry', $entries);
results in:
lorem ipsum
If you want to use specific content between the rendered partials, you may define a spacer partial that will be used for that. The spacer will be rendered with the given attributes.
- Parameters
-
string | $partial | A name of a partial template. |
array | $collection | The collection to be rendered. |
Template | string | null | $spacer | Optional a name of a partial template used as spacer. |
array | $attributes | An optional associative array of attributes and their associated values. |
- Returns
- string A string representing the rendered presentation.
- Exceptions
-
The documentation for this class was generated from the following file: