PHPclown,
For templating frameworks & engines are probably your best bet (unfortunately).
The problem with templating in general, is that you have to cover error checking (in case there is a problem with the template in question) which can be extremely time consuming.
However if you check the code critique section there was one user who posted their own templating system, and you may be able to look over their code to get ideas.
In general it's going to be hard to share a class, as anything that I (personally) have written to do any of this is for a very specific need and probably won't be of much help, in fact it will probably hinder you.
Best of luck...