PHP Class ManaPHP\Loader

Show file Open project: manaphp/manaphp

Protected Properties

Property Type Description
$_classes array
$_namespaces array

Public Methods

Method Description
___autoload ( string $className ) : boolean Makes the work of autoload registered classes
__construct ( string $manaPHPDir = null ) Loader constructor.
dump ( )
registerClasses ( array $classes, boolean $merge = true ) : static Register classes and their locations
registerNamespaces ( array $namespaces, boolean $merge = true ) : static Register namespaces and their related directories

Protected Methods

Method Description
___requireFile ( string $file ) : true If a file exists, require it from the file system.

Method Details

___autoload() public method

Makes the work of autoload registered classes
public ___autoload ( string $className ) : boolean
$className string
return boolean

___requireFile() protected method

If a file exists, require it from the file system.
protected ___requireFile ( string $file ) : true
$file string The file to require.
return true

__construct() public method

Loader constructor.
public __construct ( string $manaPHPDir = null )
$manaPHPDir string

dump() public method

public dump ( )

registerClasses() public method

Register classes and their locations
public registerClasses ( array $classes, boolean $merge = true ) : static
$classes array
$merge boolean
return static

registerNamespaces() public method

$loader->registerNamespaces(array( ’Example\\Base’ => ’vendor/example/base/’, ’Example\\Adapter’ => ’vendor/example/adapter/’, ’Example’ => ’vendor/example/’ ));
public registerNamespaces ( array $namespaces, boolean $merge = true ) : static
$namespaces array
$merge boolean
return static

Property Details

$_classes protected property

protected array $_classes
return array

$_namespaces protected property

protected array $_namespaces
return array