What's so special about QuickSkin?
Common template engines work like the following: Your PHP script specifies an HTML template and assigns some dynamic content to display. The template parser replaces all placeholders within the template with the assigned content and displays it to the user. This means a lot of string processing and regular expression work each time you want to display some content.
QuickSkin works like a 'template compiler' that converts templates into executable PHP code
and stores it for later reuse. The first time a new template is processed, all placeholders in
the template are replaced by small PHP code elements that print the assigned content. The HTML
template fragment <H3></H3>, for example, is converted into something
like <H3><?php echo $TITLE; ?></H3>. If you have assigned your
content to the right variables, there is no need for any template parsing anymore. The only thing
that has to be done is to include and execute the compiled template. This usually increases the
execution time of the template engine dramatically.
QuickSkin supports:
– Simple Scalar Substitution (Strings, etc.)
– Block Iterations (nested Arrays / BEGIN..END)
– Basic Control Structures (IF..ELSEIF..ELSE)
– Custom Extension (Output filters, uppercase, sprintf, etc.)
– Template Compilation (HTML templates are converted to executable PHP Code)
– Output Caching (Accelerates your applications by reusing page output)
– January 2009: QuickSkin is now PHP5 compliant and tested up
to and including PHP 5.2.4. It is tested with E_STRICT.