dev-master
9999999-dev https://github.com/ronan-gloo/jade.phpHAML-like template engine for PHP 5.3
MIT
The Requires
- php >=5.3.0
by Luke GB
by Janez Troha
template jade minification
HAML-like template engine for PHP 5.3
Jade.php adds inline PHP scripting support to the Jade template compiler., (*1)
The fork is a complete rewrite, all the code is ported from the original jade project., (*2)
All the features from the original are supported but undertested, including inheritance and mixins., (*3)
Jade options should be passed to the Jade construction, (*4)
$jade = new Jade([ 'prettyprint' => true, 'extension' => '.jade' 'cache' => 'pathto/writable/cachefolder/' ]);
$data['title'] = 'Hello World'; $output = (new Jade())->render('file', $data);
Filters must be callable: It can be a class that implements the __invoke() method, or an anonymous function., (*5)
$jade->filter('escaped', 'My\Callable\Class'); // or $jade->filter('escaped', function($node, $compiler){ foreach ($node->block->nodes as $line) { $output[] = $compiler->interpolate($line->value); } return htmlentities(implode("\n", $output)); });
Built-in filters:, (*6)
HAML-like template engine for PHP 5.3
MIT
template jade minification