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

  • constant
  • ini
  • yaml

Class constant

Legacy configuration driver that retrieves values from constants. It provides support for Core 3.1 configurations but should not be used for new projects.

=== Implementation Configuration keys are mapped to constants by taking the first key segment (the section) as the base namespace name with a fixed sub-namespace called "Configuration", followed by additional optional sub-namespaces with the same name as additional segments. Each segment name is converted to camel-case.

Per default, PHP constants are case-sensitive, unless they were defined explicitly to be case-insensitive. If constants are being used that do not fully translate to camel-case, the constant matching can be set to be case-insensitive by searching through all user-defined variables, with an accordingly increased overhead. A case-insensitive match is only performed if no case-sensitive match was found.

Requests for collections should be avoided, as those require an expensive search through all defined user-constants. Additionally, PHP stores all namespaces in lowercase only, hence camel-case namespaces cannot be converted to their proper option name. Use an underscore ("_") in the affected namespace name instead.

As additional constants are easily registered but existing constants cannot be changed, the system configuration is not buffered.

=== Restrictions As constants cannot be overridden in PHP, setting values is unsupported.

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
Extended by Core\Configuration\Driver\constant
Namespace: Core\Configuration\Driver
Package: Core\Configuration\Driver
Since: 3.2
Requires: PHP 5.3
Version: 1.0
Located at Configuration/Driver/constant.inc.php

Methods summary

public
# __construct( Core\URI $uri )

Driver initialisation.

Driver initialisation.

Parameters

$uri
Driver configuration URI.

Since

3.2

Overrides

Core\Configuration::__construct
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.

Since

3.2

Overrides

Core\Configuration::_lookup
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

Overrides

Core\Configuration::getArray

Methods inherited from Core\Configuration

autocreate(), decodeClassName(), get(), getDataForUndefinedKey(), getValue()

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

string CaseInsensitiveParameter

Boolean configuration parameter. If enabled, constants are resolved case-independent. This can solve problems with mixed case names.

Boolean configuration parameter. If enabled, constants are resolved case-independent. This can solve problems with mixed case names.

Initially, a matching constant is searched. If the constant is not found and this option is enabled, all user-defined constants are retrieved and the constant is matched case-independently.

Since

3.2
# 'case-insensitive'

Constants inherited from Core\Object

AnyParameterType, AutochainParameterType, AutocreateParameterType, BooleanParameterType, CharParameterType, EnumParameterType, IntegerParameterType, RealParameterType, StringParameterType, UserParameterType

Properties summary

Properties inherited from Core\Configuration

$_v_parameters

Properties inherited from Core\Field\Mutable

$_v_masqueradedKeys

Properties inherited from Core\Field

$_v_data

Magic properties inherited from Core\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