phpsource/템플릿2007. 9. 1. 17:09
written: Sep 1 2007
 
This document is not the official document in the version which is to in the process of developing. When the hereafter official document is announced consequently, the contents could more or less be changed.
Table of Contents
What is Tempo?
TEMPO(acronym for "TEMPlate Object") is a template engine for PHP. A template is an HTML document with variables in it. Tempo template engine provide basic variable substitution and dynamic block functionality. Here is a simple template with one variable ('{?=$name?}');
[code html;gutter:false] <p>Hello {?=$name?}. How are you?</p> [/code]
When a template is parsed, the variables are interpolated to HTML document.
[code html;gutter:false] <table> <tr> <th>column1</th> <th>column2</th> <th>column3</th> </tr> <tr tempo:id="eLoop"> <td>{?=$column1?}</td> <td>{?=$column2?}</td> <td>{?=$column3?}</td> </tr> </table> [/code]
The notation of the block element 'eLoop' and the Zope ZPT is similar(see zope websize).
Installation
Simply copy the class file somewhere where your script can include it, and then include it.
[code php;gutter:false] <?php require_once('somewhere/class.Tempo.php'); . . . ?> [/code]
License
hwooky's tempo(template object) is licensed using LGPL.
Copyright (c) 2006-2007 Wookyung Hwang(hwooky@phpclass.com).
All rights reserved.
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.

-GNU LESSER GENERAL PUBLIC LICENSE (LGPL)

Address Bug Reports or Comments on THIS LIBRARY ONLY to
Wookyung Hwang, hwooky@phpclass.com
The latest version of this class should be available from the following locations:
http://tempo.phpclass.com

For more info about hwooky's tempo(template object),
visit www.phpclass.com

Posted by 방글24