Skip to content

Commit

Permalink
AutoLoader: prepend in registration
Browse files Browse the repository at this point in the history
  • Loading branch information
VasekPurchart authored and dg committed Apr 6, 2012
1 parent 9fbabd6 commit a5c692c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Nette/Loaders/AutoLoader.php
Expand Up @@ -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;
}

Expand Down

0 comments on commit a5c692c

Please sign in to comment.