sade / sade
Create PHP components
v1.0.0-alpha
2018-12-20 13:32 UTC
Requires
- hashids/hashids: ^2.0
- ivopetkov/html5-dom-document-php: ^1.1
- league/climate: ^3.4
- sabberworm/php-css-parser: ^8.2
- twig/twig: ^2.0
- webmozart/glob: ^4.1
Requires (Dev)
- phpunit/phpunit: ^6.5
- squizlabs/php_codesniffer: ^3.3
This package is auto-updated.
Last update: 2024-04-12 02:53:35 UTC
README
Work in progress!
Sade, a library for creating PHP Components with Twig (2.x). This package will not do any preprocessing or somthing like that.
Documentation
The documentation is located here
Example
<template> <p>{{ greeting }} World!</p> </template> <style scoped> p { font-size: 2em; text-align: center; } </style> <?php return [ 'data' => function() { return [ 'greeting' => 'Hello' ]; } ]; ?>
To render
$sade = new \Sade\Sade(__DIR__ . '/examples'); echo $sade->render('greeting.php');
License
MIT © Fredrik Forsmo