PHP Class Go\Instrument\ClassLoading\AopComposerLoader

Datei anzeigen Open project: goaop/framework Class Usage Examples

Protected Properties

Property Type Description
$fileEnumerator Go\Instrument\FileSystem\Enumerator File enumerator
$options array AOP kernel options
$original Composer\Autoload\ClassLoader Instance of original autoloader

Public Methods

Method Description
__construct ( Composer\Autoload\ClassLoader $original, Go\Core\AspectContainer $container, array $options = [] ) Constructs an wrapper for the composer loader
findFile ( string $class ) : string | false Finds either the path to the file where the class is defined, or gets the appropriate php://filter stream for the given class.
init ( array $options = [], Go\Core\AspectContainer $container ) : boolean Initialize aspect autoloader
loadClass ( $class ) Autoload a class by it's name
wasInitialized ( ) : boolean Whether or not loader was initialized

Method Details

__construct() public method

Constructs an wrapper for the composer loader
public __construct ( Composer\Autoload\ClassLoader $original, Go\Core\AspectContainer $container, array $options = [] )
$original Composer\Autoload\ClassLoader Instance of current loader
$container Go\Core\AspectContainer Instance of the container
$options array Configuration options

findFile() public method

Finds either the path to the file where the class is defined, or gets the appropriate php://filter stream for the given class.
public findFile ( string $class ) : string | false
$class string
return string | false The path/resource if found, false otherwise.

init() public static method

Replaces original composer autoloader with wrapper
public static init ( array $options = [], Go\Core\AspectContainer $container ) : boolean
$options array Aspect kernel options
$container Go\Core\AspectContainer
return boolean was initialization sucessful or not

loadClass() public method

Autoload a class by it's name
public loadClass ( $class )

wasInitialized() public static method

Whether or not loader was initialized
public static wasInitialized ( ) : boolean
return boolean

Property Details

$fileEnumerator protected_oe property

File enumerator
protected Enumerator,Go\Instrument\FileSystem $fileEnumerator
return Go\Instrument\FileSystem\Enumerator

$options protected_oe property

AOP kernel options
protected array $options
return array

$original protected_oe property

Instance of original autoloader
protected ClassLoader,Composer\Autoload $original
return Composer\Autoload\ClassLoader