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 Configuration

Provides access to core the configuration and application settings with support for drivers.

Each entry has a key and value and can be accessed as such; keys use a namespace pattern. Values have a type associated with them to validate and automatically parse/un-parse them for storage.

Core\Object implements Core\Chainable
Extended by Core\Set implements Core\Accessor
Extended by Core\Set\Mutable implements Core\Mutator
Extended by Core\Field implements Core\Inquiry
Extended by Core\Field\Mutable implements Core\Variator
Extended by Core\Configuration

Direct known subclasses

Core\Configuration\Driver\constant, Core\Configuration\Driver\ini, Core\Configuration\Driver\yaml

Abstract
Namespace: Core
Package: Core
Since: 3.2
Requires: PHP 5.3
Version: 1.0
Located at Configuration.inc.php

Methods summary

protected
# __construct( Core\URI $uri )

Driver initialisation.

Driver initialisation.

Parameters

$uri
Driver configuration URI.

Since

3.2
public static Core\Configuration
# autocreate( Core\URI $uri )

Configuration driver factory.

Configuration driver factory.

Parameters

$uri
Driver configuration URI.

Returns

Core\Configuration
New configuration driver instance.

Since

3.2
public static string
# decodeClassName( string $identifier )

Decodes configuration notion of class identifiers by transforming the string to camel-case and replacing dots (".") and colons (":") by namespace separators.

Decodes configuration notion of class identifiers by transforming the string to camel-case and replacing dots (".") and colons (":") by namespace separators.

The notion is usually used in configuration files for improved readability.

Parameters

$identifier

Class name identifier using camel-case notion and dots (".") as namespace separators. If an already PHP-style class names is passed, it is returned normalised.

Returns

string
Decoded class name.

Since

3.2
public mixed
# get( string $key, mixed $default = null )

Retrieves a configuration option or a given default value, if the configuration option is not defined.

Retrieves a configuration option or a given default value, if the configuration option is not defined.

Parameters

$key
Name of configuration option to retrieve.
$default
Default value to return, if configuration option is not defined.

Returns

mixed

Since

3.2
public array
# getArray( string $key, mixed $default = null )

Retrieves a configuration option as an array. If the option is the default value given are not an array, the value is converted into an array.

Retrieves a configuration option as an array. If the option is the default value given are not an array, the value is converted into an array.

Parameters

$key
Name of configuration option to retrieve.
$default
Default value to return, if configuration option is not defined.

Returns

array

Configuration option value array. If the option yields null, an empty array is returned.

Since

3.2
public mixed
# getDataForUndefinedKey( string $key )

Retrieves a configuration option or null, if the configuration option is not defined.

Retrieves a configuration option or null, if the configuration option is not defined.

Parameters

$key
Name of configuration option to retrieve.

Returns

mixed

Throws

Core\Exception\UndefinedKey
Failed to resolve data field for the given key.

Since

3.2

Overrides

Core\Field::getDataForUndefinedKey
public Core\Value
# getValue( string $key, mixed $default = null )

Retrieves a configuration option or a given default value, if the configuration option is not defined, as a value instance.

Retrieves a configuration option or a given default value, if the configuration option is not defined, as a value instance.

Parameters

$key
Name of configuration option to retrieve.
$default
Default value to return, if configuration option is not defined.

Returns

Core\Value
Value instance of retrieved option value.

Since

3.2
protected mixed
# _lookup( $key )

Retrieves the raw value for a given key from the back-end storage.

Retrieves the raw value for a given key from the back-end storage.

Parameters

$key
of configuration option to retrieve.

Returns

mixed
Raw configuration value.

Remark

The standard implementation assumes that the internal field data is an associative recursive array. Drivers that implement a different buffer or retrieval method should override this method accordingly.


Since

3.2

Methods inherited from Core\Field\Mutable

offsetSet(), offsetUnset(), setDataForKey(), setDataForKeys(), setDataForUndefinedKey(), setKeyMasquerade(), updateMasqueradedKeys()

Methods inherited from Core\Field

getDataForKey(), getDataForKeys(), issetDataForKey(), offsetExists(), offsetGet()

Methods inherited from Core\Set\Mutable

__set(), __unset()

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_parameters

Driver configuration parameters.

Driver configuration parameters.

Since

3.2
#

Properties inherited from Core\Field\Mutable

$_v_masqueradedKeys

Properties inherited from Core\Field

$_v_data

Magic properties

public read-only array $parameters

Driver configuration parameters.

Magic properties inherited from Core\Field\Mutable

$masqueradedKeys

Magic properties inherited from Core\Field

$data

Magic properties inherited from Core\Object

$hash, $uuid

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