Consider setting templates as a static variable. Right now they are per set per instance, and then data is passed along to children when required by insert and yield.
setting with something like Template::set('toc', 'path/to/toc.html'); would allow:
all instances of template to have template information without passing it around, simplifying constructor and render methods
allow setting of template data outside of the request/response cycle (right now this is done with before/after template parsing, which seems like a different case)
A caveat is that templates become global, and I wonder how that would affect Request::GET stuff on sub requests. That could be resolved by appending the request ID as a key during set/yield call.. or something of that nature
Consider setting templates as a static variable. Right now they are per set per instance, and then data is passed along to children when required by
insert
andyield
.setting with something like
Template::set('toc', 'path/to/toc.html');
would allow:A caveat is that templates become global, and I wonder how that would affect Request::GET stuff on sub requests. That could be resolved by appending the request ID as a key during set/yield call.. or something of that nature