PHP Classes

PHP Template Engine Class: Process template files by replacing variable marks

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 181 All time: 8,707 This week: 47Up
Version License PHP version Categories
php-template-engine- 1.0.1MIT/X Consortium ...5PHP 5, Files and Folders, Text proces...
Description 

Author

This class can process template files by replacing variable marks.

It can take the name of a template file and processes it by replacing variables with parameter values passed using array.

The processed template data is returned as a single string.

Picture of Muhammad Umer Farooq
Name: Muhammad Umer Farooq is available for providing paid consulting. Contact Muhammad Umer Farooq .
Classes: 52 packages by
Country: Pakistan Pakistan
Age: 23
All time rank: 84310 in Pakistan Pakistan
Week rank: 51 Up1 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 6x

Example

<?php

require_once 'classes/Template.php';

$theme = new Template();

echo
$theme->SetTemplate('tamplet.html', [

   
'header' => 'PHP Tamplet engine',

   
'heading' => welcome(),

   
'body' => body(),

]);

function
welcome()
{
    return
'WELCOME';
}

function
body()
{
    return
'Hay this is created by malik umer farooq';
}


Details

PHP Template Engine Class

It is initial release

Description

This class can process template files by replacing variable marks.

It can take the name of a template file and processes it by replacing variables with parameter values passed using array.

The processed template data is returned as a single string.


  Files folder image Files (5)  
File Role Description
Files folder imageclasses (1 file)
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file Readme.md Doc. Documentation
Accessible without login Plain text file tamplet.html Data Auxiliary data

  Files folder image Files (5)  /  classes  
File Role Description
  Plain text file Template.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:181
This week:0
All time:8,707
This week:47Up