From a5c692c56e60bfd4fcd8c7705c13a52789cdf513 Mon Sep 17 00:00:00 2001 From: Vasek Purchart Date: Fri, 6 Apr 2012 11:17:42 +0200 Subject: [PATCH] AutoLoader: prepend in registration --- Nette/Loaders/AutoLoader.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Nette/Loaders/AutoLoader.php b/Nette/Loaders/AutoLoader.php index ed3fe33efc..d063a4c14b 100644 --- a/Nette/Loaders/AutoLoader.php +++ b/Nette/Loaders/AutoLoader.php @@ -59,15 +59,16 @@ final public static function getLoaders() /** * Register autoloader. + * @param bool prepend autoloader? * @return void */ - public function register() + public function register(/**/$prepend = FALSE/**/) { if (!function_exists('spl_autoload_register')) { throw new Nette\NotSupportedException('spl_autoload does not exist in this PHP installation.'); } - spl_autoload_register(array($this, 'tryLoad')); + spl_autoload_register(array($this, 'tryLoad')/**/, TRUE, (bool) $prepend/**/); self::$loaders[spl_object_hash($this)] = $this; }