Свойство | Тип | Описание | |
---|---|---|---|
$classes | array | Known classes | |
$namespaces | array | Known namespaces |
Метод | Описание | |
---|---|---|
addClass ( string $class, string $file ) | Add a new class with its file path | |
addClasses ( array $classes ) | Add multiple new classes with their file paths | |
addNamespace ( string $name ) | Add a new namespace | |
addNamespaces ( array $names ) | Add multiple new namespaces | |
getClasses ( ) : array | Return the classes as array. | |
getNamespaces ( ) : array | Return the namespaces as array | |
load ( string $class ) | Autoload a class and create an alias in the global namespace | |
register ( ) | Register the autoloader | |
scanAndRegister ( ) | Scan the module directories for config/autoload.php files and then register the autoloader on the SPL stack |
Метод | Описание | |
---|---|---|
findClass ( string $class ) : string | null | Search the namespaces for a matching entry |
public static addClasses ( array $classes ) | ||
$classes | array | An array of classes |
public static addNamespace ( string $name ) | ||
$name | string | The namespace name |
public static addNamespaces ( array $names ) | ||
$names | array | An array of namespace names |
public static getClasses ( ) : array | ||
Результат | array | An array of all classes |
public static getNamespaces ( ) : array | ||
Результат | array | An array of all namespaces |
public static scanAndRegister ( ) |
protected static array $classes | ||
Результат | array |
protected static array $namespaces | ||
Результат | array |