PHP Class PPI\Framework\Autoload

It is able to load classes that use either: * The technical interoperability standards for PHP 5.3 namespaces and class names (https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md); Example usage: PPI\Framework\Autoload::add('Symfony', PPI_VENDOR_PATH . '/path/to/src/Symfony') PPI\Framework\Autoload::register();
Exibir arquivo Open project: ppi/framework Class Usage Examples

Public Properties

Property Type Description
$_options array

Protected Properties

Property Type Description
$_loader null | object The ClassLoader object.
$_registeredNamespaces array

Public Methods

Method Description
add ( string $key, string $path ) Add a namespace to the autoloader path.
config ( array $config ) Add some items to the class config.
exists ( string $key ) : boolean Check if a namespace has been registered. This is a workaround as the default self::$_options['loader'] class does not have an exists() method.
register ( ) Register the autoloader namespaces or prefixes thus far.

Method Details

add() public static method

Add a namespace to the autoloader path.
public static add ( string $key, string $path )
$key string
$path string

config() public static method

Add some items to the class config.
public static config ( array $config )
$config array

exists() public static method

Check if a namespace has been registered. This is a workaround as the default self::$_options['loader'] class does not have an exists() method.
public static exists ( string $key ) : boolean
$key string
return boolean

register() public static method

Register the autoloader namespaces or prefixes thus far.
public static register ( )

Property Details

$_loader protected_oe static_oe property

The ClassLoader object.
protected static null|object $_loader
return null | object

$_options public_oe static_oe property

public static array $_options
return array

$_registeredNamespaces protected_oe static_oe property

protected static array $_registeredNamespaces
return array