A template engine extension for PHP
Shell C PHP
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
samples
utils
.cvsignore
API-DOC.html
API-DOC.php
ChangeLog
INSTALL
Makefile.in
README
README.html
acinclude.m4
aclocal.m4
config.guess
config.h
config.h.in
config.m4
config.sub
configure
configure.in
dynlib.m4
install-sh
libs.mk
ltconfig
ltmain.sh
php3_yats.h
yats.c

README

YATS   ( Yet Another Templating System )

This library is a PHP C extension that provides templating facilities.  
This allows the web developer to cleanly separate php code (logic) from 
html (display).  

Key benefits of using this extension as compared to other php templating 
solutions are: 

1) speed.  

Because it is in C, it is typically faster than implementations written in 
php.  

2) ease of use

Both the php API and the templating syntax are quite simple.

3) flexible, yet not a complete language.

the templating syntax provides support for simple implicit loops and 
nested sections, allowing the web developer to control things to a very 
fine degree.  However, there are no real conditional expressions or other 
logical constructs.  There is no support for embedding php code within a 
template, now will there ever be as it violates the model.  There is no 
danger of this becoming another "language within a language".

4) internationalization. (i18n, l10n)

YATS >= 0.93 supports the GNU gettext library/tools and utilizes special tags to mark
certain content for inclusion in the translation catalog. This allows
creation of a single set of HTML templates that can be used to display
your site in multiple languages.


Various iterations of this code have been/are running at Epinions.com and 
are sufficiently fast for the high traffic volume this site encounters, 
with dozens of templates being processed during each http request.  No 
specific speed claims are made.  Your mileage may vary.  

Sample php scripts are in ./sample.  The best/quickest way to learn how to 
use the library is just to view the source to these and load them in your 
browser 

It is the author's hope that this code will be found useful by someone, 
and would like to hear about how and where it is being used, or 
suggestions for improvement.  

Signed
Dan Libby <dan@libby.com>