PHP Interface IContentEvaluator, HamlPHP

Afficher le fichier Open project: hamlphp/hamlphp

Méthodes publiques

Méthode Description
evaluate ( $content, array $contentVariables = [] ) : string Evaluates a string and returns the evaluation result.
evaluateFile ( string $filePath, array $contentVariables = [] ) : string Evaluates a file and returns the evaluation result.

Method Details

evaluate() public méthode

Evaluates a string and returns the evaluation result.
public evaluate ( $content, array $contentVariables = [] ) : string
$content Contains HAML and PHP code.
$contentVariables array an array of variables
Résultat string The evaluation output

evaluateFile() public méthode

Evaluates a file and returns the evaluation result.
public evaluateFile ( string $filePath, array $contentVariables = [] ) : string
$filePath string The path to file to be evaluated
$contentVariables array The variables to pass to the template
Résultat string The evaluation output