PHP Classes
elePHPant
Icontem

XIRE: Template engine extensible with plug-in classes

Recommend this page to a friend!
  Info   View files View files (14)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2006-08-20 (10 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 588 All time: 5,015 This week: 885Up
Version License Categories
xire 1.0GNU Lesser Genera...XML, PHP 5, Templates
Description Author

This package implements a template engine to create XML, XHTML and other plain text formats. It can be extend using plug-in classes.

The templates are defined in a XML format. The tags with the xirl namespace denote template commands that are implemented by the template engine plug-ins.

Template errors throw exceptions that can be catched by applications in order to provide custom error handling.

Picture of David N. Q. Duong
Name: David N. Q. Duong <contact>
Classes: 1 package by
Country: Canada Canada

Details
Home Page: http://xire.forizon.com
Project Development Website: http://xire.bountysource.com

-------------
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.

-------------
About
-------------

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.

-------------
Terms
-------------
*  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.

-------------
Licence
-------------
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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
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
  Files folder image Files  
File Role Description
Files folder imagedemo (3 files)
Files folder imagelib (4 files, 1 directory)
Plain text file LICENCE.txt Lic. Copy of LGPL licence
Accessible without login Plain text file README.txt Doc. Readme file

  Files folder image Files  /  demo  
File Role Description
  Accessible without login Plain text file cache.php Example Demos Caching
  Accessible without login Plain text file index.php Example Demo Script
  Accessible without login Plain text file index.tpl Data Demo Template

  Files folder image Files  /  lib  
File Role Description
Files folder imageplugins (5 files)
  Accessible without login Plain text file CacheTemplate.class.php Class Cached Template
  Accessible without login Plain text file PluginManager.class.php Class Plugin Manager Class
  Accessible without login Plain text file Process.class.php Class Process Class
  Accessible without login Plain text file Template.class.php Class Template Class (primary)

  Files folder image Files  /  lib  /  plugins  
File Role Description
  Accessible without login Plain text file Else.class.php Class dummy plugin
  Accessible without login Plain text file ElseIf.class.php Class dummy plugin
  Accessible without login Plain text file For.class.php Class for plugin
  Accessible without login Plain text file If.class.php Class if plugin
  Accessible without login Plain text file ValueOf.class.php Class value-of plugin

 Version Control Unique User Downloads Download Rankings  
 0%
Total:588
This week:0
All time:5,015
This week:885Up