Dwoo is a modern, flexible and Smarty compatible template engine supporting PHP5 and PHP7.
Dwoo is a PHP5 Template Engine that was started in early 2008. The idea came from the fact that Smarty, a well known template engine, is getting older and older. It carries the weight of it’s age, having old features that are inconsistent compared to newer ones, being written for PHP4 its Object Oriented aspect doesn’t take advantage of PHP5’s more advanced features in the area, etc. Hence Dwoo was born, hoping to provide a more up to date and stronger engine.
So far it has proven to be faster than Smarty in many areas, and it provides a compatibility layer to allow developers that have been using Smarty for years to switch their application over to Dwoo progressively.
<?php // Include autoloader require 'lib/Dwoo/Autoloader.php'; // Register Dwoo namespace and register autoloader $autoloader = new Dwoo\Autoloader(); $autoloader->add('Dwoo', 'lib/Dwoo'); $autoloader->register(true); // Create Dwoo core object $dwoo = new Dwoo\Core(); // Create some data $data = array('a'=>5, 'b'=>6); // Output the result directly ... $dwoo->output('path/to/index.tpl', $data); // ... or get it to use it somewhere else $var = $dwoo->get('path/to/index.tpl', $data); echo $var;
© 2013-2021 All rights reserved.
Built with Next.js. Designed with ♥ in Montreal