dabl / view
Simple PHP view renderer
Installs: 343
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
pkg:composer/dabl/view
Requires (Dev)
- phpunit/phpunit: 4.8.*
This package is auto-updated.
Last update: 2025-10-04 11:23:01 UTC
README
Dabl View
Simple class for rendering pure PHP views
Example
app.php:
use Dabl\View\View; View::addDirectory(__DIR__ . '/views'); $output = View::load( 'view', // view name array( 'my_param' => 'hello world' // param to be injecting into the view ), true // return output instead of sending output to browser ); echo $output;
views/view.php:
<div><?= $my_param ?></div>
output:
<div>hello world</div>