Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.858.838 Times

PHP MicroTemplate 1.0.0

  Date Added: May 10, 2013  |  Visits: 218

PHP MicroTemplate

Report Broken Link
Printer Friendly Version


Product Homepage
Download (32 downloads)



This class provides an extremely fast, lightweight templating system for HTML and other text-based documents. Like FastTemplate and its many clones, MTPL supports nested blocks and looping. However, the entire implementation is done without a single regular expression. The PHP interpreter is leveraged for its built-in variable interpolation, and explode() is used to separate block markers from content using a simple delimiter. As a result, the overhead of reading and parsing template files is minimal. This should eliminate the need for a cache and improve the overall performance of template- driven sites. Since PHP's dollar sign notation (ie. "$var") is used to identify content placeholders, it is sometimes necessary to escape dollar signs in your template (ie. "$$amount"). You can use arrays with the form $array[element]; just don't quote the index. $array['element'] or $array["element"] will generate PHP parse errors due to the way PHP evaluates hashes in a string context. For the same reason, multi-level arrays will not work ("$a[b][c]" becomes the value of $a[b] followed by the literal text "[c]"). Global variables can be accessed using the usual $GLOBALS[] array method. For instance, to get the script URL, you can use $GLOBALS[PHP_SELF]. There are a few other differences. The assign() method found in most PHP template classes is gone. Instead, all assigned variables must be provided as a hash that is passed to the parse() method. Since in almost every single case a series of assign()'s is done followed by a single call to parse(), this eliminates some redundancy. It also provides a more strict scoping to template variables which should result in scripts that are easier to debug. Two variations on parse() exist: parseLoop() and parseOut(). parseLoop() takes a list of hashes instead of a single hash of variables to assign and calls parse() on the same block for each. This allows you to populate tables and drop-downs without the need to write loops into your code. parseOut() iteratively calls parse() for a given block and each of its parents in order. For instance, parseOut('main.section.sub') will parse 'main.section.sub', then 'main.section', then 'main'. Both of these methods should reduce the amount of code you need to write for typical operations. You will also notice that there is no out(), text(), or print() method. Rather than holding onto all output internally, the parse() and related methods return the resulting output. To output the result of a parse operation, simply: echo parse(...); PHP's native error handling is used for all errors and warnings. In addition, by adding "error_handling(E_ALL);" to your scripts, the PHP interpreter will warn you about any uninitialized template variables. Granted, the error messages are a bit odd (since interpolation is done inside of an eval()), but this can be a good way to track down typos.

Requirements: No special requirements
Platforms: Windows, Mac, *nix, Mac OSX, Linux, PHP , BSD Solaris
Keyword: Class Php Php Classes Php Template Template Template Class
Users rating: 0/10

License: Freeware
USER REVIEWS
More Reviews or Write Review


PHP MICROTEMPLATE RELATED
Specialized Tools  -  jpWare php login system 1.0
Open-source php/mysql login system with basic template support. This script is modified version of the well-known jpMasters77 script
67 KB  
Network & Internet  -  Captcha PHP 2.0
Captcha PHP is a PHP class library that works without cookies. It is extremely easy to integrate into existing sites and your processing logic. And it requires no database. It strives to be more user-friendly. It gives visual feedback...
22.53 KB  
Network & Internet  -  VCL for PHP 1.0
VCL for PHP is a PHP framework to help you build PHP web applications faster and easier than ever. This framework has been designed to provide visual design capabilities and its being used on Delphi for PHP. Whats New in This Release: - The...
2.2 MB  
Web Authoring  -  PHP AdminPanel 1.0.1
PHP Admin Panel (PHP AP) provides you access to the control features of your site as creating static or dynamical pages and allows your easily manage database tables with embedded PHP DataGrid. It includes Creating, Reading, Updating and Deleting...
1.37 MB  
Development Tools  -  Php2Xmi 0.a1 1.0
Php2Xmi is a command-line tool written in PHP which scans PHP classes and builds an XMI file with UML representation of classes found. XMI could be viewed using KDE's Umbrello modelling tool.
 
Development Tools  -  Php2Xmi 0.a1 1.0
Php2Xmi is a command-line tool written in PHP which scans PHP classes and builds an XMI file with UML representation of classes found. XMI could be viewed using KDE's Umbrello modelling tool.
 
Web Site Promotion  -  ApPHP DataForm 1.0.1
PHP DataForm script is a simple tool for creating HTML Forms with ease. It was especially designed for web developers, who do not want to spend excessive time on creating Forms in HTML or through PHP, but want to use a first-class OOP backend....
352.11 KB  
Network & Internet  -  SAPRFC 1.4.1
SAPRFC is a extension module for PHP 4 and PHP 5. SAPRFC can call ABAP function modules in SAP R/3 from PHP scripts. You can use the powerful PHP language to create a web applications or interface programs with a connectivity to the SAP R/3....
75.78 KB  
Programming  -  PHP Template SKOR 1.0
PHP Template SKOR : The class can assign variable values. A separate class extends the base class to support delimited template section replacements. The goal of this template engine is to separated code (PHP) from markup. Easy and fast interface.
10.53 KB  
Development Tools  -  lilTC 0.0.1
lilTC, which stands for "a 'little' template class" is a lightweight PHP class or 'template engine', which can be used for filling any kind of templates (usually HTML pages) with dynamic data. lilTC is very easy to install and to use and it...
 
NEW DOWNLOADS IN SCRIPTS, MISCELLANEOUS
Scripts  -  Free Ecommerce website creator 1.2
Free Ecommerce website creator is a free PHP shop creating script. This allows you to put a online shop on your own website. Create your own free ecommerce website for Your Business. Create an online shop using easyGUI online shop creator. The...
1.44 KB  
Scripts  -  MochiGames PHP Script ZDR 1.00
MochiGames PHP Script ZDR is web site, ready for use, for flash games. These flash games are downloaded automatically by "MochiGames PHP Script ZDR" from MochiGames media. The use of the games is free, you can use your own Mochi Publisher ID and...
368.54 KB  
Scripts  -  Php Chat 2.0
Add a free php site, single sign-on and multiple skins, 100% free 1. Server Modes: The chat server has paid mode and free mode. If the free chat mode, a free chat room will be assigned to your website with your domain as the room name. 2....
938.87 KB  
Scripts  -  Nibbleblog 3.0.1
Nibbleblog it's a powerful engine for creation and manipulation of BLOG's completely free. Very simple to install and configure (Only 1 step). The database used is based on XML files and this way it is not necessary to use MySQL or similar DBMS....
371.09 KB  
Scripts  -  PHP File Manager | CloudOsys 2.9b8
CloudOsys is a PHP file manager, a tool that allows your visitors upload files such as media content directly to your website. Your visitors will upload files directly to your website, where they can share and comment on them. Through cloud...
1.41 MB  
Miscellaneous  -  ZZIPlib Library for File sharing 0.13.56
Different applications can group files together into a single .zip archive and access them afterward.The library uses only the patent-free compression-algorithms supported by Zlib.It provides functions that transparently access files being either...
675.84 KB  
Miscellaneous  -  Traveling Salesman Problem - Nearest Neighbor Script 1.1
This method produces different results depending on what city is choosen as the starting point.This function determines the Nearest Neighbor routes for multiple starting points and returns the best of those routes.
10 KB  
Miscellaneous  -  N/A Checkbox 6.x-1.8
N/A Checkbox will allow website builders to add a checkbox next to a number textfield. The idea is to provide the users a textfield to enter a numeric value, or mark N/A in case they don't have it. When the N/A option is marked, a different value...
10 KB  
Miscellaneous  -  ILIAS LMS 4.1.2
ILIAS is a web base learning management system (LMS, VLE).Features of ILIAS LMS:- Courses,- SCORM 1.2 and 2004,- mail,- forum,- chat,- groups,- podcast,- file sharing,- authoring,- CMS,- test,- wiki,- personal desktop,- LOM,- LDAP,- role based...
89 MB  
Miscellaneous  -  Scribe for WordPress 2.0.4
Scribe is an SEO software service for WordPress - think of it as a content optimization assistant - that analyzes web pages, blog posts, and online press releases at the click of a button.Scribe then tells web writers of any kind how to tweak...
10 KB