•DS://
About

Dwoo v2

Dwoo is a modern, flexible and Smarty compatible template engine supporting PHP5 and PHP7.

Dwoo v2

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.

Quick start

1<?php 2// Include autoloader 3require 'lib/Dwoo/Autoloader.php'; 4 5 6// Register Dwoo namespace and register autoloader 7$autoloader = new Dwoo\Autoloader(); 8$autoloader->add('Dwoo', 'lib/Dwoo'); 9$autoloader->register(true); 10 11 12// Create Dwoo core object 13$dwoo = new Dwoo\Core(); 14 15 16// Create some data 17$data = array('a'=>5, 'b'=>6); 18 19 20// Output the result directly ... 21$dwoo->output('path/to/index.tpl', $data); 22// ... or get it to use it somewhere else 23$var = $dwoo->get('path/to/index.tpl', $data); 24echo $var;
  • Version

    2.0

  • License

    GNU Lesser General Public License v3.0


© 2013-2024 All rights reserved.

Built with Next.js. Designed with in Montreal