PHP Interface IContentEvaluator, HamlPHP

Exibir arquivo Open project: hamlphp/hamlphp

Public Methods

Method 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 method

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
return string The evaluation output

evaluateFile() public method

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
return string The evaluation output