PHP Classes

File: README.txt

Recommend this page to a friend!
  Classes of David N. Q. Duong  >  XIRE  >  README.txt  >  Download  
File: README.txt
Role: Documentation
Content type: text/plain
Description: Readme file
Class: XIRE
Template engine extensible with plug-in classes
Author: By
Last change: Grammatical errors from late night publishing
Date: 16 years ago
Size: 3,302 bytes


Class file image Download
Home Page:
Project Development Website:

Yet another templating engine..?

XIRE was originally just a component of another project which at first used Smarty as the templating engine. Smarty set the standard for future PHP templating engines, but it has fundamental design issues i.e. it has yet another templating syntax and it is not just a templating engine, but it is  a full-blown framework complete with error handling, resource handling, output filters, etc. Which may have been needed in back in the PHP 3 days, but most of these features are now handled nicely by PHP 5 itself.

I repackaged XIRE as a stand-alone templating engine and released it under LGPL for anyone may be interested and any constructive feedback is welcomed.


XIRE(eXtendable Information Rendering Engine) is a simple yet powerful DOM-based PHP 5 template engine, i.e. it takes data supplied by PHP and creates XML (or XHTML) documents based on templates. It is designed to work within other projects and not to be anything but a templating engine, i.e. it is not a framework.  Routines such as  error handling (XIRE will throw exceptions), resource fetching, and debuging are assumed to exist elsewhere and are not duplicated by XIRE.

*  XIRE, prounounced like “zier”, is an acronym for eXtendable Information Rendering Engine and parses XIRL namespace.
* XIRL, prounounced like “zirl”, is an acronym for eXtendable Information Rendering Language and is parsed by XIRE.

How it works

XIRE templates are merely XML documents that are processed by XIRE plugins. A plugin handles the processing of all nodes with the XIRE namespace (a node can be an element, ie. a tag, or attribute in your template) that it is registered to (based on the node’s local name).

For instance, when a plugin is registered to “zechs” then whenever a XIRE process encounters an element or attribute called “zechs” the plugin is called to handle it. If a plugin is not registered to the node, then XIRE will search in all registered directories for a plugin with the node’s name and register it. The process leaves the plugin to handle the node (and all of it’s child nodes) and continues the breadth-first search for other nodes to be processed.

How it is used

You can find more documentation at the home page.

Copyright (C) 2006  David Duong

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
For more information send a message to info at phpclasses dot org.