|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| addPsr4 ($nsPrefix, $paths, $prepend=false) | |
| addPsr0 ($nsPrefix, $paths, $prepend=false) | |
| setPsr0 ($nsPrefix, $paths) | |
| setPsr4 ($nsPrefix, $paths) | |
| loadClass ($className) | |
| findFile ($className) | |
Interface for an autoloader class that allows the dynamic modification of PSR-0 and PSR-4 mappings
Definition at line 11 of file AutoloaderInterface.php.
| addPsr0 | ( | $nsPrefix, | |
| $paths, | |||
$prepend = false |
|||
| ) |
Adds a PSR-0 mapping from a namespace prefix to directories to search in for the corresponding class
| string | $nsPrefix | The namespace prefix of the PSR-0 mapping |
| string | array | $paths | The path or paths to look in for the given prefix |
| bool | $prepend | Whether to append the given path or paths to the paths already associated with the prefix |
Implemented in ClassLoaderWrapper.
| addPsr4 | ( | $nsPrefix, | |
| $paths, | |||
$prepend = false |
|||
| ) |
Adds a PSR-4 mapping from a namespace prefix to directories to search in for the corresponding class
| string | $nsPrefix | The namespace prefix of the PSR-4 mapping |
| string | array | $paths | The path or paths to look in for the given prefix |
| bool | $prepend | Whether to append the given path or paths to the paths already associated with the prefix |
Implemented in ClassLoaderWrapper.
| findFile | ( | $className | ) |
Get filepath of class on system or false if it does not exist
| string | $className |
Implemented in ClassLoaderWrapper.
| loadClass | ( | $className | ) |
Attempts to load a class and returns true if successful.
| string | $className |
Implemented in ClassLoaderWrapper.
| setPsr0 | ( | $nsPrefix, | |
| $paths | |||
| ) |
Creates new PSR-0 mappings from the given prefix to the given set of paths, eliminating previous mappings
| string | $nsPrefix | The namespace prefix of the PSR-0 mapping |
| string | array | $paths | The path or paths to look in for the given prefix |
Implemented in ClassLoaderWrapper.
| setPsr4 | ( | $nsPrefix, | |
| $paths | |||
| ) |
Creates new PSR-4 mappings from the given prefix to the given set of paths, eliminating previous mappings
| string | $nsPrefix | The namespace prefix of the PSR-0 mapping |
| string | array | $paths | The path or paths to look in for the given prefix |
Implemented in ClassLoaderWrapper.