Design pattern question: encapsulation or inheritance
- by Matt
Hey all,
I have a question I have been toiling over for quite a while. I am building a templating engine with two main classes Template.php and Tag.php, with a bunch of extension classes like Img.php and String.php.
The program works like this:
A Template object creates a Tag objects. Each tag object determines which extension class (img,…