Re: Procedural Autoloader?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22 November 2010 22:40, Daniel P. Brown <daniel.brown@xxxxxxxxxxxx> wrote:
> On Mon, Nov 22, 2010 at 16:31, Nathan Nobbe <quickshiftin@xxxxxxxxx> wrote:
>>
>> Shrug, if you want to really be dirty about it, you could just put a 'class'
>> atop each file of functions.
>> <?php
>> class IWishTheseFunctionsWereOOInstead {} // :P
>> function firstProceeduralFunc() {
>> Â// ..
>> }
>> ?>
>
> Â ÂThat's not going to be economical or allow him to autoload,
> though, because the autoloader is called when the class is
> instantiated.

Not to mention that it has nothing to do with a procedural autoloader.
Autoloading takes place if you try to instantiate an object of a class
that PHP doesn't know about (yet). There is no such thing for
functions. Either refactor your code so you don't have this problem
(The Way To Go [tm]) or make an extension. End of discussion.

Regards
Peter

-- 
<hype>
WWW: plphp.dk / plind.dk
LinkedIn: plind
BeWelcome/Couchsurfing: Fake51
Twitter: kafe15
</hype>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux