kaffa / textpattern

Automatically exported from code.google.com/p/textpattern
0 stars 0 forks source link

Add template tag registry and registering #371

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This was first asked to be included in Neal Poole's security findings. 
Registering has few benefits:

* Security, the tag language can not execute any and every function.
* Namespace support, callbacks, prevents collisions. The PHP name and tag name 
do not have to be same.
* Automation; building tag collection classes and magic binds becomes very much 
possible.

Todo;

* Add basic tag registering. Don't go too crazy with extending and stuff - goal 
is to make the code usable in some framework too if we decide to use one.
* Allow current function-to-tag mapping as a fallback. Issue unregistered tag 
notice if deemed necessary.
* Later on introduce classes for automation and update the new 4.6.0 tags to 
use PSR-0 class loader.

Those that are wondering, yes this will increase memory usage and runtime. But 
this being about this, I don't even consider it as a factor.

Original issue reported on code.google.com by jukka.m.svahn on 26 Feb 2013 at 5:44

GoogleCodeExporter commented 8 years ago

Original comment by jukka.m.svahn on 26 Feb 2013 at 5:44