My ideas on a modular template Design
| From: | Joshua Eichorn | Date: | Wed, 02 Jun 2004 16:40:05 +0000 |
| Subject: | My ideas on a modular template Design | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-29876@lists.php.net to get a copy of this message | ||
Overall Template Design
API Wrapper (for BC in seperate packages)
Standard API (would be best to include a smarty/savant api, and a registration pull api)
Template Filter -> (run compilers as triggered actions here)
Template Plugins -> (runtime components, would be great if the same overall design could be used for runtime regex replace)
Output Buffering (optional)
Pure php Template
Read from Buffer and return (optional)
Output Filters \
|- should be seperate packages but work easily with templates
Output Cache /
Template Compiler -> An action ran by a template filter for automatic on change operation. All compilers should all be designed to work standalone where compiling is an external step/
Filter and Output Buffering, and plugins are optional
That way you can have a minimal overhead setup were your template outputs content directly instead of returning from a method.
It would be great if a design like this could support templates like: IT,Savant ,Smarty,Xipe, or WACT
-josh