Re: [SMARTY-DEV] Re: object support

From: Date: Thu, 16 Jan 2003 10:19:03 +0000
Subject: Re: [SMARTY-DEV] Re: object support
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-553@lists.php.net to get a copy of this message
----- Original Message ----- From: "Bharat Mediratta" <bharat@menalto.com> To: "Monte Ohrt" <monte@ispi.net> Cc: "Nichlas Löfdahl" <crotalus@acc.umu.se>; "Smarty Dev" <smarty-dev@lists.php.net> Sent: Thursday, January 16, 2003 7:58 AM Subject: Re: [SMARTY-DEV] Re: object support > I realize that things are possibly heading in a different direction > but I wanted to respond to Monty's comments and introduce some > useful info that we'll have to address no matter what approach > we take. > > Monty says: > > Bharat says: > > > PHP already has a concept for pairing instance and method name > > > in an array and providing that in place of a function name. > > > For example, PHP's register_shutdown_function() takes this as > > > an option. So we could have this syntax: > > > > > > $smarty->register_function('themeFoo', array(&$theme, > > > 'foo')); > > > > I don't like the idea of requiring call-time pass-by-reference, many > > installations have it disabled anyways. I'd rather use a separate > > function and do that in the declaration. > > I don't believe that this falls under call-time pass-by-reference > restriction that PHP imposes. In my dev environment, I have > call-time pass-by-reference disabled and use the above construct > without any warnings or errors. > PHP does give an notice warning for this, but because the Smarty fetch function does turn off the E_NOTICE error_reporting, this may stay hidden from you. Even with error_reporting(E_ALL). Greetings, Jan Rosier James Bond: Do you expect me to talk? Auric Goldfinger: No Mr. Bond! I expect you to die! >

« previous php.smarty.dev (#553) next »