I'd have thought that code would do the job assuming it doesn't clobber any 
previously registered autoloaders. I'd prefer it wrapped up in a little 
function, however, just for convenience :) 

By my understanding, you don't need to actually call the autoload method 
'__autoload' so you could call it something more specific to phptal.

Robert

On 2 Jun 2010, at 11:29, Kornel Lesiński wrote:

> On 02-06-2010 at 11:10:43 Robert Goldsmith <rgoldsm...@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
> 
> _______________________________________________
> PHPTAL mailing list
> PHPTAL@lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal


_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to