Re: new Smarty 2.0 plugin: calendar navigation widget
| From: | Luc Saint-Elie | Date: | Fri, 08 Mar 2002 08:38:30 +0000 |
| Subject: | Re: new Smarty 2.0 plugin: calendar navigation widget | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2976@lists.php.net to get a copy of this message | ||
At 09:36 08/03/02 +0100, LIMBOURG Arnaud wrote:
You might want to have a look at Janson Anders smarty objects pool manager. I can't remember the url though ... Browse trough the archive. It is useful when using multiple instances of smarty ;)) Arnaud.Here it is : Delivered-To: saint-elie.com-luc@saint-elie.com X-Originating-IP: [194.237.241.42] From: <anders.janson@mailbox.swipnet.se> To: smarty@lists.ispi.net Subject: [smarty] Template pool class Date: Mon, 19 Nov 2001 22:44:25 +0100 List-Unsubscribe: <mailto:$subst('Email.Unsub')> This class is helpful if your app is like mine - you need several Smarty objects concurrently, but you don't know how many, and you don't want to create a bunch of global objects "just in case". AND you don't want to create temporary Smarty objects in your functions. This class dynamically creates 'global' Smarty objects when they are needed, and lets you recycle them when you don't need them anymore. Everything is encapsulated in the class/namespace TPL, but I could have done it with global functions just as well. Usage: include "class.tpl.php"; : : $smarty = & TPL::alloc(); : : TPL::free($smarty); Look at code: http://qualitum.com/Smarty/class.tpl.phps Download: http://qualitum.com/Smarty/class.tpl.php.txt Feedback appreciated! /Anders