phptal / PHPTAL

PHP Template Attribute Language — template engine for XSS-proof well-formed XHTML and HTML5 pages
http://phptal.org
GNU Lesser General Public License v2.1
175 stars 43 forks source link

Tales closure #21

Closed ajcrites closed 11 years ago

ajcrites commented 11 years ago

For issue #20: Adding the ability to set tal variables to closures (anonymous functions) and support closures returned at any point in the TALES path.

ajcrites commented 11 years ago

Will rewrite to use is_object && instanceof instead of is_a; there seems to be another error

ajcrites commented 11 years ago

Per porneL's suggestion, removed instanceof. It was only needed in the OmitTag case, but the phptal_unravel_closure function addition obviates that. This allows for the removal of the phpversion check.

ajcrites commented 11 years ago

I have created d30117d in a separate branch as an alternative; this allows for any invokable expression as well as distinctly Closures to be invoked.

kornelski commented 11 years ago

That's a really good job! Thanks!