PHP Classes

PHP OOP Template Engine: Setup and process template with a fluent interface

Recommend this page to a friend!
  Info   View files Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 182 All time: 8,673 This week: 136Up
Version License PHP version Categories
oop-template 0.1GNU General Publi...5.6.0PHP 5, Templates


This class can setup and process template with a fluent interface.

It can load and process a template assigning template file to porcess and the variables to replace using a fluent interface of chained class calls.

The class can apply several template functions to values, like changing the case of the values, assign variable values within the template itself, loops, conditions, custom PHP code, etc..

Picture of Yerfry Ramirez
  Performance   Level  
Name: Yerfry Ramirez is available for providing paid consulting. Contact Yerfry Ramirez .
Classes: 7 packages by
Country: Sweden Sweden
Age: ???
All time rank: 184018 in Sweden Sweden
Week rank: 405 Up4 in Sweden Sweden Up
Innovation award
Innovation award
Nominee: 1x


require_once 'config.php';

$Template = new Template();

assign('Variable', 'mhm')

/** You can also do
    $Template->assign('Variable', 'mhm');

    $Template->Output(); // Or $Template->setFile('test.html')->Output();

  Files folder image Files  
File Role Description
Files folder imagetemplates (2 files)
Files folder imageclasses (1 file)
Accessible without login Plain text file index.php Example Index page

  Files folder image Files  /  templates  
File Role Description
  Accessible without login Plain text file test.html Aux. Example 1
  Accessible without login Plain text file mhm.html Aux. Example 2

  Files folder image Files  /  classes  
File Role Description
  Plain text file Class.Template.php Class Template Class

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:8,673
This week:136Up