As the name says, it is made to be basic and direct.
View Class
| Name | Description | |——|————-| |__construct|Function __construct| |getFunctions|Function getFunctions Get all defineds Twig functions| |getView|Fuction getView Get a string result os template with optional $data array| |hasFunction|Function hasFunction Check if has a Twig function named by $name argument| |setFilters|Function setFilters Setting filters functions for use into template
$app->setViewFilters([
//here, key is required
"isTrue" => function ($value = true) {
return $value;
}
]);
Description
public __construct (array $paths)
Function __construct
Parameters
(array) $paths
Return Values
void
Description
public getFunctions (void)
Function getFunctions Get all defineds Twig functions
Parameters
This function has no parameters.
Return Values
array
Description
public getView (string $name, array $data)
Fuction getView Get a string result os template with optional $data array
Parameters
(string) $name
(array) $data
Return Values
string|null
Description
public hasFunction (string $name)
Function hasFunction Check if has a Twig function named by $name argument
Parameters
(string) $name
Return Values
bool
Description
public setFilters (array $filters)
Function setFilters Setting filters functions for use into template
$app->setViewFilters([
//here, key is required
"isTrue" => function ($value = true) {
return $value;
}
]);
Parameters
(array) $filters
Return Values
\View