Autoload::register(): void

In this article

Register the autoloader.

Description

Note: the autoloader is prepended in the autoload queue.
This is done to ensure that the Requests 2.0 autoloader takes precedence over a potentially (dependency-registered) Requests 1.x autoloader.

Return

void

Source

public static function register() {
	if (defined('REQUESTS_AUTOLOAD_REGISTERED') === false) {
		spl_autoload_register([self::class, 'load'], true);
		define('REQUESTS_AUTOLOAD_REGISTERED', true);
	}
}

User Contributed Notes

You must log in before being able to contribute a note or feedback.