namesco / ZTal

ZTal makes integrating the PHP templating system PHPTAL into Zend Framework easy.
Other
21 stars 3 forks source link

How to use namespaced Tales? #23

Closed xorock closed 11 years ago

xorock commented 11 years ago

Manual only covers situation when underscored class was registered. Ztal_Tales_Generic.zendDate:....

How to use namespaced \Ztal\Tales\Generic?

Drarok commented 11 years ago

There's a patch in our fork of PHPTAL that allows the use of namespaced TALES: https://github.com/namesco/PHPTAL/commit/d2873aa6d109333af152d6bdc48f8f14306b961c

It's been accepted into the upstream PHPTAL project, but it's not in an official release yet.

Apart from that, you use them exactly the same as non-namespaced ones. There are examples in the docblocks for the TALES themselves: https://github.com/namesco/ZTal/blob/master/Tales/Generic.php#L121