 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
TakingSides Smarty Rookie
Joined: 11 Dec 2010 Posts: 30
|
Posted: Mon Apr 30, 2012 9:16 am Post subject: Namespace support |
|
|
HI All,
a few months ago I said I was going to release a framework which makes use of the Smarty library. After a release candidate which I felt could be improved, anyway more to the subject of Smarty..
My framework makes use of Namespaces. There's application logic and packages.
Smarty is imported as a package, and used by the core package.
What's the easiest way of namespacing Smarty without modifying the core files and losing the changes when I upgrade each release? Or would Smarty be able to support namespacing? |
|
| Back to top |
|
rodneyrehm Administrator

Joined: 30 Mar 2007 Posts: 698 Location: Germany, border to Switzerland
|
Posted: Mon Apr 30, 2012 9:35 am Post subject: |
|
|
There are two sides to namespaces with Smarty.
1) exposing / encapsulating Smarty itself in a namespace.
As Smarty3 is PHP5.2 compatible, this is simply not going to happen any time soon. As sad as this makes me myself, I don't think it's going to happen for Smarty3. Reason: quite slow adoption rate of major PHP releases. Too many people are still running old PHP versions.
2) accessing namespaced elements.
We're working on improving our APIs so namespaced functions can be registered, so templates can understand namespaced classes and constants. But these improvements won't be available any time soon. _________________ Twitter |
|
| Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|