Class Module
Represents the concept of a source file that is managed by the framework loader mechanisms and compatible with the auto-load system.
Module instances can be created for virtual module names. The existence of a module instance does not imply that a corresponding file also exists.
= Dependency Information = Modules may contain an optional dependency information block at the end of the source file that lists all dependencies of a module. This information is accessible through module instances and can be used together with the recursive iterator to check whether an installation fulfills all application dependencies.
- Core\Object implements Core\Chainable
- Core\Set implements Core\Accessor
- Core\Module
Package: Core\Module
Since: 3.1
Requires: PHP 5.3
Version: 1.2
Located at Module.inc.php
Methods summary
public
|
#
__construct( string $module )
Initialises a new instance from a module or the corresponding class name.
The constructor does not test, whether the module actually exists, i.e.
it is possible to represent virtual modules and access certain properties.
Use |
public static
|
|
public static
|
#
createWithClassFromObject( object $object )
Returns a new module instance based on the class of the given object. |
public static
|
#
createWithRegisteredFilename( string $filename )
Creates a new module instance from filename registered with the Loader. |
public
|
|
public
boolean
|
|
public
true
|
|
public static
|
#
recursiveIteratorForPath( string $path )
Returns a new module iterator instance to recursively list modules. |
public
string
|
#
resolveResource( string $resourceName, string $extension = null )
Returns the resolved resource path for a module resource. |
public
string
|
#
resourcePath( string $resourceName = null )
Returns the unresolved resource path for the current module. |
public
|
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
string
|
$_v_filename
Module filename. |
|
protected
string
|
$_v_name
Name of module. |
|
protected
string
|
$_v_resolvedPath
Fully resolved & canonicalised module filename or |
Magic properties
public read-only
|
$dependencies
Dependency instance for the module or |
public read-only
boolean
|
$exists
|
public read-only
string
|
$filename
Module filename. |
public read-only
string
|
$name
Name of module. |
public read-only
string
|
$resolvedPath
Fully resolved & canonicalised module filename or |
public read-only
string
|
$resourcePath
Unresolved resource path for the current module. |
public read-only
|
$version
Version information instance or |