PHP Class Sonata\Component\Generator\Mustache

Author: Fabien Potencier ([email protected])
Show file Open project: sonata-project/ecommerce Class Usage Examples

Public Methods

Method Description
renderDir ( string $dir, array $parameters ) Renders a directory recursively.
renderFile ( string $file, array $parameters ) Renders a file by replacing the contents of $file with rendered output.
renderString ( string $string, array $parameters ) : string Renders a single line. Looks for {{ var }}.

Method Details

renderDir() public static method

Renders a directory recursively.
public static renderDir ( string $dir, array $parameters )
$dir string Path to the directory that will be recursively rendered
$parameters array

renderFile() public static method

Renders a file by replacing the contents of $file with rendered output.
public static renderFile ( string $file, array $parameters )
$file string filename for the file to be rendered
$parameters array

renderString() public static method

Renders a single line. Looks for {{ var }}.
public static renderString ( string $string, array $parameters ) : string
$string string
$parameters array
return string