mirror of
https://github.com/predis/predis.git
synced 2026-08-30 04:02:22 +00:00
Make it possible to prepend the autoloader.
This commit is contained in:
@@ -35,10 +35,12 @@ class Autoloader
|
||||
|
||||
/**
|
||||
* Registers the autoloader class with the PHP SPL autoloader.
|
||||
*
|
||||
* @param boolean $prepend Prepend the autoloader on the stack instead of appending it.
|
||||
*/
|
||||
public static function register()
|
||||
public static function register($prepend = false)
|
||||
{
|
||||
spl_autoload_register(array(new self, 'autoload'));
|
||||
spl_autoload_register(array(new self, 'autoload'), true, $prepend);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user