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
Protected Properties
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.
config()
public static method
Add some items to the class config.
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.
register()
public static method
Register the autoloader namespaces or prefixes thus far.
Property Details
$_loader protected_oe static_oe property
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 |
|