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 Object

Object is the root class for most core class hierarchies. Object provides key-value coding support methods and generic helpers for all derived classes. Also, all Core\Object derived classes inherit a default implementation to the Core\Chainable interface.

Core\Object implements Core\Chainable

Direct known subclasses

Core\Charset\Iterator, Core\Env, Core\Locale_Iterator, Core\Nothing, Core\Set, Core\Storage\Accessor

Indirect known subclasses

Core\Authentication, Core\Authentication\Auto, Core\Authentication_Token, Core\Formatter\Driver\coreuimarkup\Token\B, Core\Formatter\Driver\coreuimarkup\Token\H2, Core\Formatter\Driver\coreuimarkup\Token\H3, Core\Formatter\Driver\coreuimarkup\Token\H4, Core\Formatter\Driver\coreuimarkup\Token\H5, Core\Formatter\Driver\coreuimarkup\Token\H6, Core\Formatter\Driver\coreuimarkup\Token\I, Core\Formatter\Driver\coreuimarkup\Token\LineBreak, Core\Formatter\Driver\coreuimarkup\Token\P, Core\Formatter\Driver\coreuimarkup\Token\Template, Core\Autoloader, Core\Formatter\Driver\coreuimarkup\Token\TT, Core\Formatter\Driver\coreuimarkup\Token\UL, Core\Formatter\Driver\coreuimarkup\Token\URL, Core\Formatter\Driver\coreuimarkup\Token\Variable, Core\Hash, Core\Hash\Iterator, Core\IP, Core\Locale, Core\Locale\Uncached, Core\Locale_Node, Core\Cache, Core\Log, Core\Log\Driver\stream, Core\Log\Driver\syslog, Core\Module, Core\Module\Dependency, Core\Module\Dependency\Requirement, Core\Module\Dependency\Requirement\Core\sspi_auth, Core\Module\Dependency\Requirement\PHP, Core\Module\Dependency\Requirement\PHP\bcmath, Core\Module\Dependency\Requirement\PHP\bz2, Core\Cache\Driver\apc, Core\Module\Dependency\Requirement\PHP\date, Core\Module\Dependency\Requirement\PHP\ereg, Core\Module\Dependency\Requirement\PHP\gd, Core\Module\Dependency\Requirement\PHP\hash, Core\Module\Dependency\Requirement\PHP\ldap, Core\Module\Dependency\Requirement\PHP\libxml, Core\Module\Dependency\Requirement\PHP\mbstring, Core\Module\Dependency\Requirement\PHP\mysqli, Core\Module\Dependency\Requirement\PHP\openssl, Core\Module\Dependency\Requirement\PHP\pcre, Core\Cache\Driver\file, Core\Module\Dependency\Requirement\PHP\session, Core\Module\Dependency\Requirement\PHP\SimpleXML, Core\Module\Dependency\Requirement\PHP\SPL, Core\Module\Dependency\Requirement\PHP\SQLite, Core\Module\Dependency\Requirement\PHP\sqlite3, Core\Module\Dependency\Requirement\PHP\zlib, Core\Module\Linkage, Core\Module\Linkage\Driver\phpstorm, Core\Module\Linkage\Driver\standard, Core\Module\Linkage\Driver\tracbrowser, Core\Cache\Driver\null, Core\Module\Linkage\Driver\tracsource, Core\Module\Linkage\Driver\txmt, Core\Plugin, Core\Plugin\Manager, Core\Plugin\Zone, Core\Query, Core\Query\Driver\fullpath, Core\Query\Driver\localizedfullpath, Core\Query\Driver\minipath, Core\Query\Driver\standard, Core\Cache\Driver\storage, Core\Registry, Core\Resource, Core\Server, Core\Server\Driver\web, Core\Session, Core\Session\Driver\files, Core\Session\Driver\sqlite, Core\Session\Driver\storage, Core\Session_Token, Core\Set\Mutable, Core\Charset, Core\Storage, Core\Storage\Accessor_Alias, Core\Storage\Accessor_BitwiseAND, Core\Storage\Accessor_BitwiseOR, Core\Storage\Accessor_BitwiseXOR, Core\Storage\Accessor_Call, Core\Storage\Accessor_Conditional, Core\Storage\Accessor_Conditionals, Core\Storage\Accessor_Conjunction, Core\Storage\Accessor_Count, Core\Charset\Driver\ascii, Core\Storage\Accessor_Disjunction, Core\Storage\Accessor_Eq, Core\Storage\Accessor_Eraser, Core\Storage\Accessor_Expressions, Core\Storage\Accessor_Grouping, Core\Storage\Accessor_GT, Core\Storage\Accessor_GTE, Core\Storage\Accessor_Insert, Core\Storage\Accessor_Join, Core\Storage\Accessor_JoinConditional, Core\Charset\Driver\iso88591, Core\Storage\Accessor_Key, Core\Storage\Accessor_Limit, Core\Storage\Accessor_List, Core\Storage\Accessor_LT, Core\Storage\Accessor_LTE, Core\Storage\Accessor_Match, Core\Storage\Accessor_NEq, Core\Storage\Accessor_Node, Core\Storage\Accessor_Not, Core\Storage\Accessor_Now, Core\Authentication\Auto\Driver\basic, Core\Charset\Driver\iso885915, Core\Storage\Accessor_Ordering, Core\Storage\Accessor_Parameter, Core\Storage\Accessor_Reference, Core\Storage\Accessor_Regexp, Core\Storage\Accessor_Reverse, Core\Storage\Accessor_Selector, Core\Storage\Accessor_Similarity, Core\Storage\Accessor_Update, Core\Storage\Accessor_Value, Core\Storage\Accessor_Values, Core\Charset\Driver\macroman, Core\Storage\Accessor_Wildcard, Core\Storage\Driver\mysql, Core\Storage\Driver\mysql_Result, Core\Storage\Driver\mysql_Result_Statement, Core\Storage\Driver\mysql_Statement, Core\Storage\Driver\odbc, Core\Storage\Driver\odbc_Result, Core\Storage\Driver\odbc_Statement, Core\Storage\Driver\sqlite2, Core\Storage\Driver\sqlite2_Result, Core\Charset\Driver\sjis, Core\Storage\Driver\sqlite2_Statement, Core\Storage\Driver\sqlite3, Core\Storage\Driver\sqlite3_Result, Core\Storage\Driver\sqlite3_Statement, Core\Storage\Field, Core\Storage\Field\Aggregate, Core\Storage\Field\Element, Core\Storage\Field\Element\Pair, Core\Storage\Field\Element\Retained, Core\Storage\SQL_Result, Core\Charset\Driver\utf16, Core\Storage\SQL_Statement, Core\Storage_Result, Core\Storage_Statement, Core\Stream, Core\Stream\Buildin, Core\Stream\Driver\csv, Core\Stream\Driver\file, Core\Stream\Driver\input, Core\Stream\Driver\memory, Core\Stream\Driver\null, Core\Charset\Driver\utf16be, Core\Stream\Driver\output, Core\Stream\Driver\stderr, Core\Stream\Driver\stdin, Core\Stream\Driver\stdout, Core\Stream\Driver\swap, Core\String, Core\String\Encrypted, Core\Translation, Core\Translation\Driver\language, Core\Translation\Language, Core\Charset\Driver\utf16le, Core\Translation\Language\Driver\xml, Core\Translation\Language\Driver\xml_Node, Core\Translation\Language_Node, Core\URI, Core\URI\Driver\file, Core\URI\Driver\ftp, Core\URI\Driver\http, Core\URI\Driver\mailto, Core\URI\Driver\ssl, Core\URI\Driver\tcp, Core\Charset\Driver\utf32, Core\URI\URL, Core\URI_Parameters, Core\UUID, Core\Value, Core\Version, Core\View, Core\View\Driver\coreui, Core\View\Driver\coreui\Control, Core\View\Driver\coreui\Control\Button, Core\View\Driver\coreui\Control\Button\Navigate, Core\Charset\Driver\utf32be, Core\View\Driver\coreui\Control\Button\Submit, Core\View\Driver\coreui\Control\Dialog, Core\View\Driver\coreui\Control\Table, Core\View\Driver\coreui\Control\Table\Listing, Core\View\Driver\coreui\Element, Core\View\Driver\coreui\Element\A, Core\View\Driver\coreui\Element\BUTTON, Core\View\Driver\coreui\Element\COL, Core\View\Driver\coreui\Element\COLGROUP, Core\View\Driver\coreui\Element\DIV, Core\Charset\Driver\utf32le, Core\View\Driver\coreui\Element\FIELDSET, Core\View\Driver\coreui\Element\FORM, Core\View\Driver\coreui\Element\IFRAME, Core\View\Driver\coreui\Element\IMG, Core\View\Driver\coreui\Element\INPUT, Core\View\Driver\coreui\Element\LABEL, Core\View\Driver\coreui\Element\LEGEND, Core\View\Driver\coreui\Element\LI, Core\View\Driver\coreui\Element\LINK, Core\View\Driver\coreui\Element\META, Core\Charset\Driver\utf8, Core\View\Driver\coreui\Element\OBJECT, Core\View\Driver\coreui\Element\OL, Core\View\Driver\coreui\Element\OPTGROUP, Core\View\Driver\coreui\Element\P, Core\View\Driver\coreui\Element\PARAM, Core\View\Driver\coreui\Element\SCRIPT, Core\View\Driver\coreui\Element\SELECT, Core\View\Driver\coreui\Element\SOURCE, Core\View\Driver\coreui\Element\TABLE, Core\View\Driver\coreui\Element\TBODY, Core\Authentication\Auto\Driver\digest, Core\Charset\MultiByte, Core\View\Driver\coreui\Element\TD, Core\View\Driver\coreui\Element\TEXTAREA, Core\View\Driver\coreui\Element\TFOOT, Core\View\Driver\coreui\Element\TH, Core\View\Driver\coreui\Element\THEAD, Core\View\Driver\coreui\Element\TR, Core\View\Driver\coreui\Element\UL, Core\View\Driver\coreui\Element\VIDEO, Core\View\Driver\html, Core\View\Driver\htmlbuilder, Core\Closure, Core\View\Driver\htmlbuilder\Node, Core\View\Driver\htmlbuilder\Tags\A, Core\View\Driver\htmlbuilder\Tags\COL, Core\View\Driver\htmlbuilder\Tags\COLGROUP, Core\View\Driver\htmlbuilder\Tags\DIV, Core\View\Driver\htmlbuilder\Tags\FIELDSET, Core\View\Driver\htmlbuilder\Tags\FORM, Core\View\Driver\htmlbuilder\Tags\IMG, Core\View\Driver\htmlbuilder\Tags\INPUT, Core\View\Driver\htmlbuilder\Tags\LABEL, Core\Controller, Core\View\Driver\htmlbuilder\Tags\LEGEND, Core\View\Driver\htmlbuilder\Tags\LI, Core\View\Driver\htmlbuilder\Tags\OL, Core\View\Driver\htmlbuilder\Tags\OPTGROUP, Core\View\Driver\htmlbuilder\Tags\P, Core\View\Driver\htmlbuilder\Tags\SCRIPT, Core\View\Driver\htmlbuilder\Tags\SELECT, Core\View\Driver\htmlbuilder\Tags\TABLE, Core\View\Driver\htmlbuilder\Tags\TBODY, Core\View\Driver\htmlbuilder\Tags\TD, Core\Controller\Primary, Core\View\Driver\htmlbuilder\Tags\TEXTAREA, Core\View\Driver\htmlbuilder\Tags\TFOOT, Core\View\Driver\htmlbuilder\Tags\TH, Core\View\Driver\htmlbuilder\Tags\THEAD, Core\View\Driver\htmlbuilder\Tags\TR, Core\View\Driver\htmlbuilder\Tags\UL, Core\View\Driver\htmlbuilder\Text, Core\View\Driver\plain, Core\View\Driver\yui, Core\View\Driver\yui\Modules\NavigationMenu, Core\Converter, Core\View\Driver\yui\Node, Core\Converter\Driver\vardump, Core\Date, Core\Decoder, Core\Decoder\Driver\base64, Core\Decoder\Driver\base64s, Core\Authentication\Driver\ldap, Core\Decoder\Driver\boolean, Core\Decoder\Driver\charset, Core\Decoder\Driver\decimal, Core\Decoder\Driver\delegate, Core\Decoder\Driver\html, Core\Decoder\Driver\integer, Core\Decoder\Driver\passthrough, Core\Decoder\Driver\rawurl, Core\Decoder\Driver\serialize, Core\Decoder\Driver\url, Core\Authentication\Driver\ldap_Token, Core\Decoder\Driver\uu, Core\Delegate, Core\Dispatcher, Core\Encoder, Core\Encoder\Driver\base64, Core\Encoder\Driver\base64s, Core\Encoder\Driver\boolean, Core\Encoder\Driver\charset, Core\Encoder\Driver\clear, Core\Encoder\Driver\crc32, Core\Authentication\Driver\sspi, Core\Encoder\Driver\decimal, Core\Encoder\Driver\delegate, Core\Encoder\Driver\escape, Core\Encoder\Driver\hash, Core\Encoder\Driver\html, Core\Encoder\Driver\integer, Core\Encoder\Driver\md5, Core\Encoder\Driver\md5sum, Core\Encoder\Driver\passthrough, Core\Encoder\Driver\qp, Core\Authentication\Driver\sspi_Token, Core\Encoder\Driver\rawurl, Core\Encoder\Driver\serialize, Core\Encoder\Driver\sha, Core\Encoder\Driver\sha1, Core\Encoder\Driver\sha1sum, Core\Encoder\Driver\smd5, Core\Encoder\Driver\split, Core\Encoder\Driver\ssha, Core\Encoder\Driver\taggedhash, Core\Encoder\Driver\url, Core\Authentication\Driver\storage, Core\Encoder\Driver\uu, Core\Encoder\Driver\xml, Core\Env_Field, Core\Env_File, Core\Env_FileList, Core\Env_SERVER, Core\Exchange, Core\Exchange\Driver\csv, Core\Exchange\Driver\csv_Import, Core\Exchange\Matrix, Core\Authentication\Driver\storage_Token, Core\Exchange\Matrix_Import, Core\Fault, Core\Field, Core\Field\Mutable, Core\Filter, Core\Filter\Driver\email, Core\Filter_Value, Core\Formatter, Core\Formatter\Driver\coreuimarkup, Core\Formatter\Driver\coreuimarkup\Token

Namespace: Core
Package: Core
Since: 3.0
Requires: PHP 5.3
Version: 1.0
Located at Object.inc.php

Methods summary

public static Core\ClassDescriptor
# attachMethod( string $methodName, object $object, string $objectMethod )

Attaches a new method to the class of the instance.

Attaches a new method to the class of the instance.

Parameters

$methodName
Name of method to attach.
$object
Object holding the implemented method to attach.
$objectMethod
Name of method in object to attach.

Returns

Core\ClassDescriptor
Class descriptor interface for the class of the instance.

Since

3.1
protected static object
# __autocreateFactory( Core\URI $uri, string $class )

Helper method for standardised autocreate factories. Takes the Core\URI scheme, base class name and an optional module path to build the target module name and tries to load the module. On success, a new driver instance is created, taking the Core\URI as its only argument; if the scheme is »class«, the class identified by the path component of the Core\URI is created instead. Otherwise an invalid driver exception is thrown.

Helper method for standardised autocreate factories. Takes the Core\URI scheme, base class name and an optional module path to build the target module name and tries to load the module. On success, a new driver instance is created, taking the Core\URI as its only argument; if the scheme is »class«, the class identified by the path component of the Core\URI is created instead. Otherwise an invalid driver exception is thrown.

A standard autocreate factory implementation equals the following example:

static public function autocreate(URI $uri_)
{ return self::__autocreateFactory($uri_, __CLASS__);
}

Parameters

$uri

Driver specification Core\URI instance. The scheme identifies the driver to load, all other Core\URI components are used by the driver itself (e.g. configuration settings). The Core\URI is passed verbatim to the driver instance.

$class

Name of base class offering the autocreate factory. Usually the constant __CLASS__ is used. Drivers are searched in the subdirectory with the same name as the base class.

Returns

object
New driver instance.

Throws

Core\Exception\InvalidDriver
The driver module does not exist.

Since

3.0
public mixed
# __call( string $name, array $args )

Implements support for dynamically attached methods to classes.

Implements support for dynamically attached methods to classes.

Classes implementing __call() should should call their parent implementation of this method if either the invoked method name is not handled by their implementation or further processing is required. Otherwise the class will no longer support dynamically attached methods.

Parameters

$name
Name of the invoked method.
$args
Array or arguments passed to the invoked method.

Returns

mixed
Return value of the attached method.

Throws

Core\Exception\BadMethodCall
The invoked method is neither a class method nor an attached method.

Since

3.1
public string
# __toString( )

Formats a generic string representation of the current object. Subclasses should provide a more specific implementation with further details on the object.

Formats a generic string representation of the current object. Subclasses should provide a more specific implementation with further details on the object.

The standard object representation of this function may change in the future without further notice and thus should not be reprocessed.

Returns

string

Generic string representation of the current object. The standard output contains the object class name and the instance UUID. The example code echo new Set(); returns a string similar to

object[Set]@21254f96-fd59-4bff-8536-c713fe803d58

Since

3.0
public integer|boolean
# chain( Core\Chainable $object, array $flags = null )

Connects another object to the current object. Usage depends on the actual class implementation; common examples are lazy configuration completion or layer expansions.

Connects another object to the current object. Usage depends on the actual class implementation; common examples are lazy configuration completion or layer expansions.

Parameters

$object
Object to chain to instance.
$flags

Optional array of additional chain flags. Usage depends on the actual chain implementation.

Returns

integer|boolean
Returns a non-zero value on success, otherwise false.

Throws

Core\Exception\InvalidArgument
Class of provided object is not supported.

Since

3.0

Implementation of

Core\Chainable::chain()
public mixed
# getValueForKey( string $key )

Retrieves the value for a specified key. Values are retrieved in the following order:

Retrieves the value for a specified key. Values are retrieved in the following order:

  1. If a property named _v_key exists, its value is returned;
  2. otherwise a method named equal to the key is called;
  3. if no such method exists, Core\Object::getValueForUndefinedKey() is called.

Subclasses in general should not override the default behaviour of this function; instead provide properties or methods for specific keys. To dynamically process keys, implement Core\Object::getValueForUndefinedKey().

Parameters

$key
Key to retrieve value for.

Returns

mixed
Value of key, if key exists.

Throws

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

See

Core\Object::getValueForUndefinedKey()

Since

3.0
final public mixed
# getValueForKeyPath( string $path )

Retrieves the value for a specified key path. A key path can contain multiple path segments separated by a dot ».«. Each segment is the key to identify a value of the object identified by the previous segment. The first key identifies a value from the current object.

Retrieves the value for a specified key path. A key path can contain multiple path segments separated by a dot ».«. Each segment is the key to identify a value of the object identified by the previous segment. The first key identifies a value from the current object.

Segments prefixed with an exclamation mark !segment denote a KDC data field, segments prefixed with an at sign @segment denote an accumulator function for a collection object. Segments that return an array or ArrayAccess conform objects may specify the index of an entry by adding an array-like index key in squared brackets as in segment[key].

Each value or field is resolved via Core\Object::getValueForKey() or Field::getDataForKey(), respectively. Subclasses may overloaded these methods for optimisation purposes or specific extensions.

Parameters

$path
Key path to retrieve value for.

Returns

mixed
Value for key path.

Throws

Core\Exception\InvalidArgument
A key path must be non-empty.
Core\Exception\UndefinedKey
Failed to resolve the value for a path segment.

See

Core\Object::getValueForKey()
Field::getDataForKey()

Since

3.0
public mixed
# getValueForUndefinedKey( string $key )

Retrieves the value for an undefined key. The default implementation throws Core\Exception\UndefinedKey; subclasses should implement an own version of this method to provide dynamic value access. This method is always called, when Core\Object::getValueForKey() fails.

Retrieves the value for an undefined key. The default implementation throws Core\Exception\UndefinedKey; subclasses should implement an own version of this method to provide dynamic value access. This method is always called, when Core\Object::getValueForKey() fails.

Subclasses implementing Core\Object::getValueForUndefinedKey() should also provide an own implementation of Core\Object::issetValueForKey().

Parameters

$key
Key to retrieve value for.

Returns

mixed
Value of key.

Throws

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

See

Core\Object::getValueForKey()
Core\Object::issetValueForKey()

Since

3.0
public string
# hash( )

Returns a hash value for the current instance that is unique for each object but equal for all equal objects. The default implementation returns the SPL object hash.

Returns a hash value for the current instance that is unique for each object but equal for all equal objects. The default implementation returns the SPL object hash.

Returns

string
Hash value of current object.

Since

3.0
public boolean
# issetValueForKey( string $key )

Tests, whether a property or method for a given key exists. The default implementation cannot test, if Core\Object::getValueForUndefinedKey() can handle a key; thus subclasses implementing Core\Object::getValueForUndefinedKey() should also provide an own implementation for Core\Object::issetValueForKey().

Tests, whether a property or method for a given key exists. The default implementation cannot test, if Core\Object::getValueForUndefinedKey() can handle a key; thus subclasses implementing Core\Object::getValueForUndefinedKey() should also provide an own implementation for Core\Object::issetValueForKey().

Parameters

$key
Key to check for existence.

Returns

boolean
true, if a property or method for the given key exists, otherwise false.

Since

3.0
public mixed
# setValueForKey( string $key, mixed $value )

Updates the value for a specified key. Values are updated in the following order:

Updates the value for a specified key. Values are updated in the following order:

  1. If a method named setKey exists, the update is handled by that method;
  2. otherwise a property named _v_key is updated;
  3. if no such property exists, Core\Object::setValueForUndefinedKey() is called.

Subclasses in general should not override the default behaviour of this function; instead provide properties or methods for specific keys. To dynamically process keys, implement Core\Object::setValueForUndefinedKey().

Parameters

$key
Key to update value for.
$value
New value for the given key.

Returns

mixed

true, if a property has directly been updated, otherwise the return value of the called method is returned and is implementation dependent.

Throws

Core\Exception\UndefinedKey
An update operation is not available for the given key.

See

Core\Object::setValueForUndefinedKey()

Since

3.0
final public mixed
# setValueForKeyPath( string $path, mixed $value )

Updates the value for a specified key path. See Core\Object::getValueForKeyPath() for implementation details.

Updates the value for a specified key path. See Core\Object::getValueForKeyPath() for implementation details.

Parameters

$path
Key path to update value for.
$value
New value for the given key path.

Returns

mixed

true, if a property has directly been updated, otherwise the return value of the latest Core\Object::setValueForKey() call is returned.

Throws

Core\Exception\InvalidArgument
A key path must be non-empty.
Core\Exception\UndefinedKey

Failed to resolve the value for a path segment or an update operation is not available for the last path segment.

See

Core\Object::setValueForKey()

Since

3.0
public mixed
# setValueForUndefinedKey( string $key, mixed $value )

Updates value for an undefined key. The default implementation throws Core\Exception\UndefinedKey; subclasses should implement an own version of this method to provide dynamic value access. The method is always called, when Core\Object::setValueForKey() fails.

Updates value for an undefined key. The default implementation throws Core\Exception\UndefinedKey; subclasses should implement an own version of this method to provide dynamic value access. The method is always called, when Core\Object::setValueForKey() fails.

Parameters

$key
Key to update value for.
$value
New value for the given key.

Returns

mixed
The return value depends on the actual implementation.

Throws

Core\Exception\UndefinedKey
An update operation is not available for the given key.

See

Core\Object::setValueForKey()

Since

3.0
public string
# uuid( )

Returns the instance UUID-string. On the first request, a new UUID-string is assigned and stored with the object. Further requests will return the same UUID-string for the same object.

Returns the instance UUID-string. On the first request, a new UUID-string is assigned and stored with the object. Further requests will return the same UUID-string for the same object.

The SPL object hash is an alternative to object UUIDs but with a drawback: the SPL object hash is only unique for objects residing in memory at the same time; once an object is released, its hash is re-used. The object UUID generated from this method is unique for an object regardless of time.

Returns

string
UUID-string to identify the current object.

See

Core\UUID

Since

3.0
protected
# __processParameters( Core\URI $uri, array $parameterSet )

Helper method for processing Core\URI parameters.

Helper method for processing Core\URI parameters.

Complex parameters should be parsed manually after automatic expansion. During automatic expansion, the internal URI parameter set is processed and hence available for further processing. A class implementation using automatic parameter processing must define the protected variable $_v_parameters.

Parameters

$uri
Core\URI instance containing parameters.
$parameterSet

Array of associative key-value pairs. The key specifies the parameter name, the value is an array of up to three values defining the parameter type, default value (optional) and whether the parameter is mandatory (optional). Some data types may require additional parameters.

Throws

Core\Exception\InvalidArgument
Target object for auto-chaining does not implement Core\Chainable.
Core\Exception\MissingParameter
Mandatory parameter is missing.
Core\Exception\Parameter
Invalid value for enumeration parameter.

Since

3.0

Constants summary

string AnyParameterType

Any (undefined) parameter type, used by automated parameter expansion.

Any (undefined) parameter type, used by automated parameter expansion.

Since

3.0
# 'X'
string AutochainParameterType

Automatically chains a list of registry keys to a given target. If no target is given, the object itself is used as the target of the chaining operation.

Automatically chains a list of registry keys to a given target. If no target is given, the object itself is used as the target of the chaining operation.

Since

3.1
# 'C'
string AutocreateParameterType

Autocreate parameter type, used by automated parameter expansion. Initialises a new instance of a given class hierarchy using the URI string contained in the parameter value.

Autocreate parameter type, used by automated parameter expansion. Initialises a new instance of a given class hierarchy using the URI string contained in the parameter value.

This parameter requires a fourth parameter set entry containing the name of the base class for the hierarchy to load and call the autocreate factory.

Since

3.0
# 'a'
string CharParameterType

Character parameter type, used by automated parameter expansion.

Character parameter type, used by automated parameter expansion.

The value is automatically truncated to at most one character in size.

Since

3.0
# 'c'
string BooleanParameterType

Boolean parameter type, used by automated parameter expansion.

Boolean parameter type, used by automated parameter expansion.

Since

3.0
# 'b'
string EnumParameterType

Enum parameter type, used by automated parameter expansion. An enum is a set of predefined allowed values.

Enum parameter type, used by automated parameter expansion. An enum is a set of predefined allowed values.

This parameter type requires a fourth parameter set entry containing the set of allowed values.

Since

3.0
# 'e'
string IntegerParameterType

Integer parameter type, used by automated parameter expansion.

Integer parameter type, used by automated parameter expansion.

Supports an optional fourth and fifth parameter to define a minimum and maximum value, respectively, for the parameter value. Boundaries are applied transparently without raising an error (3.1 extension).

Since

3.0
# 'i'
string RealParameterType

Real parameter type, used by automated parameter expansion.

Real parameter type, used by automated parameter expansion.

Supports an optional fourth and fifth parameter to define a minimum and maximum value, respectively, for the parameter value. Boundaries are applied transparently without raising an error (3.1 extension).

Since

3.0
# 'r'
string StringParameterType

String parameter type, used by automated parameter expansion.

String parameter type, used by automated parameter expansion.

Since

3.0
# 's'
string UserParameterType

User-defined parameter type, parsed via callback.

User-defined parameter type, parsed via callback.

Since

3.0
# 'U'

Properties summary

Magic properties

public read-only string $hash

See Core\Object::hash().

public read-only string $uuid

See Core\Object::uuid().

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