Class AutoLoader
Extensible auto-loader used by Medusa Core with support for user-defined callbacks to support arbitrary file architectures.
The default auto-loader should also suffice for most applications. Classes are mapped based on their namespace hierarchy onto the file system and are searched on the include paths. Module loader mechanisms are used, hence the file extension must match that of Medusa Core.
Class names that contain an underscore are expected to reside in the same module (file) as their base class for historical reasons and is considered obsolete and may be removed in future versions.
- Core\Object implements Core\Chainable
- Core\Set implements Core\Accessor
- Core\AutoLoader
Namespace: Core
Package: Core
Since: 3.0
Requires: PHP 5.3, SPL 5.2.1
Version: 3.0
Located at AutoLoader.inc.php
Methods summary
public static
|
|
public static
|
#
add( callable|object|string $callableOrObject, string $methodName = null )
Registers a new auto-loader callback. |
public static
|
|
public static
boolean
|
|
public
boolean
|
#
load( $className )
Loads the module for the specified class. The module name is extracted
from the class name; namespace components are transformed into module
hierarchy levels. Supports module class extensions by removing the class
name part starting with an underscore (ie. the class |
public
boolean
|
#
remove( callable|object|string $callableOrObject, string $methodName = null )
Removes an auto-loader callback. |
public static
|
Methods inherited from Core\Object
__autocreateFactory()
,
__call()
,
__processParameters()
,
__toString()
,
attachMethod()
,
chain()
,
getValueForKey()
,
getValueForKeyPath()
,
getValueForUndefinedKey()
,
hash()
,
issetValueForKey()
,
setValueForKey()
,
setValueForKeyPath()
,
setValueForUndefinedKey()
,
uuid()
Constants summary
Constants inherited from Core\Object
AnyParameterType
,
AutochainParameterType
,
AutocreateParameterType
,
BooleanParameterType
,
CharParameterType
,
EnumParameterType
,
IntegerParameterType
,
RealParameterType
,
StringParameterType
,
UserParameterType
Properties summary
protected
array
|
$_v_callbacks
Array of registered callbacks. |
#
array ()
|
Magic properties
public read-only
array
|
$callbacks
Array of registered callbacks. |