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

Namespaces

  • Core
    • Authentication
      • Auto
        • Driver
      • Driver
    • Cache
      • Driver
    • Charset
      • Driver
    • Configuration
    • Controller
    • Converter
      • Driver
    • Decoder
      • Driver
    • Encoder
      • Driver
    • Env
      • Authentication
      • Locale
      • Proxy
      • Server
        • HTTP
        • Redirect
        • X
    • Exception
    • Exchange
      • 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
    • 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
  • 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_Iterator
  • 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
  • String
  • 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
  • UseVersion
  • Version

Functions

  • ns_expand
  • ns_file_exists
  • ns_get_version
  • ns_resolve

Class Autoloader

Extensible auto-loader for Core classes with support for user-defined callbacks to support arbitrary file architectures.

Core\Object implements Core\Chainable
Extended by Core\Set implements Core\Accessor
Extended by Core\Autoloader
Final
Namespace: Core
Package: Core
See: Core\Autoloader::load()
Since: 3.0
Requires: PHP 5.3, SPL 5.2.1
Version: 2.1
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 Core-compatible 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 (e.g. the class Core\Env_File is defined in the module Core:Env).

Loads the Core-compatible 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 (e.g. the class Core\Env_File is defined in the module Core:Env).

Support for class aliases has been removed as of Medusa v3.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 Core auto-loader interface.

Deactivates the Core auto-loader interface.

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.

# array ()

Magic properties inherited from Core\Object

$hash, $uuid

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