[PHPTAL] require_once vs autoloading
Kornel Lesiński
kornel at aardvarkmedia.co.uk
Wed Jun 2 12:29:32 CEST 2010
On 02-06-2010 at 11:10:43 Robert Goldsmith <rgoldsmith at names.co.uk> wrote:
>> Why would someone choose to replace PHPTAL's autoload with something
>> else? (I'm not implying it's perfect or such, just wondering what
>> problem would such option solve).
>
> If people already have autoloader code and wish to use only one
> autoloader in their application or if they find the autoloader they are
> already using conflicts with the phptal one then it would be good to
> allow them to disable the phptal autoloader.
require_once "PHPTAL.php";
spl_autoload_unregister(array('PHPTAL','autoload'));
// if needed: spl_autoload_register('__autoload');
Would that be OK?
--
regards, Kornel
More information about the PHPTAL
mailing list