PHP Class Webiny\Component\ClassLoader\Loaders\Psr0

Inheritance: extends AbstractLoader
Show file Open project: Webiny/Framework Class Usage Examples

Protected Properties

Property Type Description
$instance Holds the loader instance.

Public Methods

Method Description
findClass ( string $class ) : string | boolean Parses that class name and returns the absolute path to the class.
registerMap ( string $prefix, array | string $library ) : void Register a map.

Method Details

findClass() public method

NOTE: no file existence checks should be performed, nor should the method require or include the class, is should just return the path to the file.
public findClass ( string $class ) : string | boolean
$class string Class name that should be loaded.
return string | boolean Path to the class or false.

registerMap() public method

Register a map.
public registerMap ( string $prefix, array | string $library ) : void
$prefix string Map prefix or namespace.
$library array | string Absolute path to the library or an array with path and additional options.
return void

Property Details

$instance protected static property

Holds the loader instance.
protected static $instance