public function register()
	{
		// Since the default file extensions are searched
		// in order of .inc then .php, but we always use .php,
		// put the .php extension first to eek out a bit
		// better performance.
		// http://php.net/manual/en/function.spl-autoload.php#78053
		spl_autoload_extensions('.php,.inc');

		// Prepend the PSR4  autoloader for maximum performance.
		spl_autoload_register([$this, 'loadClass'], true, true);

		// Now prepend another loader for the files in our class map.
		$config = is_array($this->classmap) ? $this->classmap : [];

		spl_autoload_register(function ($class) use ($config) {
			if (empty($config[$class]))
			{
				return false;
			}

			include_once $config[$class];
		}, true, // Throw exception
			true // Prepend
		);
	}
public function register()
	{
		// Since the default file extensions are searched
		// in order of .inc then .php, but we always use .php,
		// put the .php extension first to eek out a bit
		// better performance.
		// http://php.net/manual/en/function.spl-autoload.php#78053
		spl_autoload_extensions('.php,.inc');

		// Prepend the PSR4  autoloader for maximum performance.
		spl_autoload_register([$this, 'loadClass'], true, true);

		// Now prepend another loader for the files in our class map.
		$config = is_array($this->classmap) ? $this->classmap : [];

		spl_autoload_register(function ($class) use ($config) {
			if (empty($config[$class]))
			{
				return false;
			}

			include_once $config[$class];
		}, true, // Throw exception
			true // Prepend
		);
	}
public function register ( ) { // Since the default file extensions are searched // in order of .inc then .php, but we always use .php, // put the .php extension first to eek out a bit // better performance. // http://php.net/manual/en/function.spl-autoload.php#78053 spl_autoload_extensions ( '.php,.inc' ) ; // Prepend the PSR4  autoloader for maximum performance. spl_autoload_register ( [ $ this , 'loadClass' ] , true , true ) ; // Now prepend another loader for the files in our class map. $ config = is_array ( $ this -> classmap ) ? $ this -> classmap : [ ] ; spl_autoload_register ( function ( $ class ) use ( $ config ) { if ( empty ( $ config [ $ class ] ) ) { return false ; } include_once $ config [ $ class ] ; } , true , // Throw exception true // Prepend ) ; }
Register the loader with the SPL autoloader stack.
Register the loader with the SPL autoloader stack .