PHP Classes
elePHPant
Icontem

STPL: Render templates using PHP code scripts

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2018-05-26 (1 month ago) RSS 2.0 feedNot enough user ratingsTotal: 109 This week: 2All time: 8,904 This week: 220Up
Version License PHP version Categories
stpl 1.0.0BSD License7.2PHP 5, Templates
Description Author

This class can render templates using PHP code scripts.

It takes a given PHP script that mixes data and code that calls the class to outputs data that is inserted in placeholder positions of the template.

Currently it can replace placeholder positions with variable values taken from parameters passed as associative arrays or replace sections defined using the return values of callback function.

  Performance   Level  
Name: Aleksandar Zivanovic <contact>
Classes: 11 packages by
Country: Serbia Serbia
Age: 24
All time rank: 19358 in Serbia Serbia
Week rank: 147 Up2 in Serbia Serbia Up
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Files folder imagetemplate (1 file, 2 directories)
Accessible without login Plain text file index.php Example Entry file for example.
Plain text file STPL.php Class Simple PHP template engine, without using any fancy custom syntax, it relies only on pure php and plain html

  Files folder image Files  /  template  
File Role Description
Files folder imagepages (1 file)
Files folder imagepartials (2 files)
  Accessible without login Plain text file base.php Example Example script

  Files folder image Files  /  template  /  pages  
File Role Description
  Accessible without login Plain text file welcome.php Example Example script

  Files folder image Files  /  template  /  partials  
File Role Description
  Accessible without login Plain text file bottom.php Example Example script
  Accessible without login Plain text file top.php Example Example script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:109
This week:2
All time:8,904
This week:220Up
User Comments (1)
A very helpful class for templating in core php
26 days ago (Dinesh Suthar)
70%StarStarStarStar