|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
bsmither Smarty Elite
Joined: 20 Dec 2011 Posts: 322 Location: West Coast
|
Posted: Sat Jun 21, 2014 3:31 am Post subject: Direct Access to Variable |
|
|
In the doc page:
http://www.smarty.net/docs/en/variable.template.dir.tpl
a comment is made that "As of Smarty 3.1 the attribute $template_dir is no longer accessible directly."
Yet I see many working examples in these forums of:
$Smarty->template_dir = "something";
If this is not direct access, what would an example be that I can no longer use? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Jun 21, 2014 4:56 am Post subject: |
|
|
The template_dir folders and other needs to be sanitized and some other action is necessary when the folders are changed. For this
reasion we introduced the setter/getter functions.
But you still direct access the property as the access gets mapped by the magic __get() __set() functions to the setter/getter.
But you do loose some performance... |
|
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
|