- Why simply not use preg_replace_callback() instead of preg_split() / rebuilding the string?
- The declaration of $this->template is missing
- Protected methods need their docblocks
- " { " goes on the following line in the function <method> () declarations
- Use single quotes ' instead of " around static strings
- Break long lines