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 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
Extended by Core\Set implements Core\Accessor
Extended by Core\AutoLoader
Final
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
# activate( )

Activates the Core auto-loader interface.

Activates the Core auto-loader interface.

Since

3.0
public static
# add( callable|object|string $callableOrObject, string $methodName = null )

Registers a new auto-loader callback.

Registers a new auto-loader callback.

If an auto-loader callback is already registered, additional registration attempts for the same callback are ignored.

Parameters

$callableOrObject

Either callable, or object or class name with additionally provided method name.

$methodName
Name of method if object or class name were provided as first argument.

Returns


$this

Throws

Core\Exception\Delegate

The provided callback is not callable. Note, that if a static class method is used as a callback, the class must be defined, otherwise this exception is thrown. The auto-loader registration does not attempt to load non-existing classes.

See

Core\AutoLoader::remove()

Since

3.0
public static
# instance( )

Since

3.0
public static boolean
# invoke( $className )

Invokes all registered callbacks in order of their registration.

Invokes all registered callbacks in order of their registration.

Parameters

$className
qualified (containing namespaces) class name to load module for.

Returns

boolean
true if the class module was successfully loaded, otherwise false.

Since

3.0
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 Core\Env_File is defined in the module Core:Env).

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 Core\Env_File is defined in the module Core:Env).

Support for class aliases has been removed as of Medusa Core 3.1; this feature was rendered obsolete by the new PHP 5.3 use statements that support native aliasing.

Parameters

$className
qualified (containing namespaces) class name to load module for.

Returns

boolean
true if the class module was successfully loaded, otherwise false.

Since

3.0
public boolean
# remove( callable|object|string $callableOrObject, string $methodName = null )

Removes an auto-loader callback.

Removes an auto-loader callback.

Parameters

$callableOrObject

Either callable, or object or class name with additionally provided method name.

$methodName
Name of method if object or class name were provided as first argument.

Returns

boolean
true on successful removal or false, if the callback is not found.

See

Core\AutoLoader::add()

Since

3.0
public static
# resign( )

Deactivates the auto-loader.

Deactivates the auto-loader.

Since

3.0

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 array $_v_callbacks

Array of registered callbacks.

Array of registered callbacks.

Since

3.0
# array ()

Magic properties

public read-only array $callbacks

Array of registered callbacks.

Magic properties inherited from Core\Object

$hash, $uuid

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