![]() |
NanoFramework 1.4.0
A tiny PHP Framework
|
Parses files to insert data. More...
Public Member Functions | |
| parseFile (string $source, array $variables=[], array $rawVariables=[]) | |
| parse (string $content, array $variables=[], array $rawVariables=[]) | |
Parses files to insert data.
This class allows the parsing of files to include specific data.
| parse | ( | string | $content, |
| array | $variables = [], |
||
| array | $rawVariables = [] |
||
| ) |
This method takes a string formatted with the template engine syntax (see TemplateEngineSyntax for more information) and inserts the data before returning it.
All the data in $variables will be escaped before being inserted. Those in $rawVariables won't.
| string | $content | the string in which to insert data |
| array | $variables | the associative array containing variables to be escaped |
| array | $rawVariables | the associative array containing variables not to be escaped |
| parseFile | ( | string | $source, |
| array | $variables = [], |
||
| array | $rawVariables = [] |
||
| ) |
This method takes the path of a file, reads from it and parses it using the View::parse method. See that one for mor information.
| string | $source | the path of the file |
| array | $variables | the variables to insert |
| array | $rawVariables | the secure variables to insert |