xplo.re Medusa Core Framework 3.2
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Event
  • Todo
  • Download

Namespaces

  • Core
    • Authentication
      • Auto
        • Driver
      • Driver
    • Cache
      • Driver
    • Charset
      • Driver
    • Configuration
      • Driver
    • Controller
    • Converter
      • Driver
    • Decoder
      • Driver
    • Encoder
      • Driver
    • Env
      • Authentication
      • Locale
      • Proxy
      • Server
        • HTTP
        • Redirect
        • X
    • Exception
    • Exchange
      • Driver
    • Fault
      • Formatter
        • Driver
      • Incident
        • Exception
      • Reporter
        • Driver
    • Field
    • Filter
      • Driver
    • Formatter
      • Driver
        • coreuimarkup
          • Token
    • Hash
    • Loader
    • Locale
    • Log
      • Driver
    • Module
      • Dependency
        • Requirement
          • Core
          • PHP
      • Linkage
        • Driver
    • PDF
    • Plugin
    • Query
      • Driver
    • Server
      • Driver
    • Session
      • Driver
    • Set
    • Storage
      • Driver
      • Field
        • Element
    • Stream
      • Driver
    • String
    • Translation
      • Driver
      • Language
        • Driver
    • Type
    • URI
      • Driver
    • Version
    • View
      • Driver
        • coreui
          • Control
            • Button
            • Table
          • Element
        • htmlbuilder
          • Tags
        • yui
          • Modules
  • None
  • PHP

Classes

  • Authentication
  • Authentication_Token
  • AutoLoader
  • Cache
  • Charset
  • ClassDescriptor
  • Closure
  • Configuration
  • Controller
  • Converter
  • Date
  • Decoder
  • Delegate
  • Dispatcher
  • Encoder
  • Env
  • Env_Field
  • Env_File
  • Env_FileList
  • Env_Request
  • Env_SERVER
  • Exchange
  • Fault
  • Field
  • Filter
  • Filter_Value
  • Formatter
  • Hash
  • IP
  • Loader
  • Locale
  • Locale_Node
  • Log
  • Module
  • Module_Iterator
  • Nothing
  • Object
  • OS
  • Plugin
  • Profiler
  • Query
  • Registry
  • Resource
  • Server
  • Session
  • Session_Token
  • Set
  • Storage
  • Storage_Result
  • Storage_Statement
  • Stream
  • Translation
  • URI
  • URI_Parameters
  • UUID
  • Value
  • Version
  • View

Interfaces

  • Accessor
  • Chainable
  • Comparable
  • Configurable
  • Equality
  • Identity
  • Inquiry
  • Masquerade
  • Mutator
  • SeekableStream
  • Storable
  • Variator

Exceptions

  • Exception

Constants

  • Copyright
  • ProductName
  • Version

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
Extended by Core\Set implements Core\Accessor
Extended by Core\Module
Namespace: Core
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 Core\Module::exists() to test whether the represented module can be resolved against the include paths.

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 Core\Module::exists() to test whether the represented module can be resolved against the include paths.

Parameters

$module
Module or class name with full namespace specification.

Since

3.1
public static Core\Module
# createWithClass( string $className )

Returns a new module instance based on a given class name.

Returns a new module instance based on a given class name.

Parameters

$className
Name of class to retrieve module for.

Returns

Core\Module
Instance of module for given class.

Since

3.2
public static Core\Module
# createWithClassFromObject( object $object )

Returns a new module instance based on the class of the given object.

Returns a new module instance based on the class of the given object.

Parameters

$object
Object to retrieve module for.

Returns

Core\Module
Instance of module for class of provided object.

Since

3.2
public static Core\Module
# createWithRegisteredFilename( string $filename )

Creates a new module instance from filename registered with the Loader.

Creates a new module instance from filename registered with the Loader.

Parameters

$filename
Filename to retrieve module for.

Returns

Core\Module

Module instance if filename is pointing to an existing module, otherwise null.

Since

3.1
public Core\Module\Dependency
# dependencies( )

Returns a new Core\Module\Dependency instance for the represented module.

Returns a new Core\Module\Dependency instance for the represented module.

Returns

Core\Module\Dependency

New dependency information instance or null, if the module does not exist or if it does not contain a valid dependency information block.

Since

3.1
public boolean
# exists( )

Determines whether the represented module exists.

Determines whether the represented module exists.

Returns

boolean
true, if the represented module actually exists, otherwise false.

Since

3.1
public true
# load( )

Loads the represented module by using the standard Loader interface.

Loads the represented module by using the standard Loader interface.

Returns

true
true on success, otherwise an exception is thrown.

Throws

Core\Exception\Loader

Failed to load the module. Either the module does not exist or an error occurred while parsing and executing the module source.

Since

3.1
public static Core\Module_Iterator
# recursiveIteratorForPath( string $path )

Returns a new module iterator instance to recursively list modules.

Returns a new module iterator instance to recursively list modules.

Parameters

$path
Pathname to start module recursion in.

Returns

Core\Module_Iterator
Module iterator instance to iterator over modules found.

Since

3.1
public string
# resolveResource( string $resourceName, string $extension = null )

Returns the resolved resource path for a module resource.

Returns the resolved resource path for a module resource.

Parameters

$resourceName

Name of resource of this module to resolve. If null, the resolved base path is returned.

$extension

Optional resource extension. This parameter is provided for convenience only; the resource name given in the first parameter may already include an extension.

Returns

string

Fully canonicalised absolute resource path for the given module resource or null, if the resource path does not exist or cannot be accessed by the script.

Since

3.2
public string
# resourcePath( string $resourceName = null )

Returns the unresolved resource path for the current module.

Returns the unresolved resource path for the current module.

A module resource path is a directory named "rsrc" and located in the subdirectory of a module of the same name, relative to the module. For the module "Core:Module", the resource corresponding path is (using UNIX directory separators) "Core/Module/rsrc".

Parameters

$resourceName

Optional name of resource to resolve. If null, the base path is returned.

Returns

string

Relative resource path for the module or module resource, or null, if the resource path does not exist or cannot be accessed by the script.

Since

3.2
public Core\Version
# version( )

Returns the module version.

Returns the module version.

Returns

Core\Version

Version information instance or null, if no version information is available.

Since

3.1

Methods inherited from Core\Set

__get(), __isset()

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.

Module filename.

Since

3.1
#
protected string $_v_name

Name of module.

Name of module.

Since

3.1
#
protected string $_v_resolvedPath

Fully resolved & canonicalised module filename or null if the file does not exist or cannot be accessed.

Fully resolved & canonicalised module filename or null if the file does not exist or cannot be accessed.

Since

3.1
#

Magic properties

public read-only Core\Module\Dependency $dependencies

Dependency instance for the module or null, if either the module does not exist or no dependency information is available.

public read-only boolean $exists

true, if the represented module actually exists, otherwise false.

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 null if the file does not exist or cannot be accessed.

public read-only string $resourcePath

Unresolved resource path for the current module.

public read-only Core\Version $version

Version information instance or null, if no version information is available.

Magic properties inherited from Core\Object

$hash, $uuid

xplo.re Medusa Core Framework 3.2 API documentation generated by ApiGen