ClassLoader

class ClassLoader (View source)

Properties

static protected array $directories The registered directories.
static protected bool $registered Indicates if a ClassLoader has been registered.

Methods

static bool load(string $class)

Load the given class file.

static string normalizeClass(string $class)

Get the normal file name for a class.

static void register()

Register the given class loader on the auto-loader stack.

static void addDirectories(string|array $directories)

Add directories to the class loader.

static void removeDirectories(string|array $directories = null)

Remove directories from the class loader.

static array getDirectories()

Gets all the directories registered with the loader.

Details

static bool load(string $class)

Load the given class file.

Parameters

string $class

Return Value

bool

static string normalizeClass(string $class)

Get the normal file name for a class.

Parameters

string $class

Return Value

string

static void register()

Register the given class loader on the auto-loader stack.

Return Value

void

static void addDirectories(string|array $directories)

Add directories to the class loader.

Parameters

string|array $directories

Return Value

void

static void removeDirectories(string|array $directories = null)

Remove directories from the class loader.

Parameters

string|array $directories

Return Value

void

static array getDirectories()

Gets all the directories registered with the loader.

Return Value

array

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.4/Illuminate/Support/ClassLoader.html