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

  • Mutable

Class Mutable

Mutable fields extend the default Field functionality by allowing the user to write to (dynamic) data fields.

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

Direct known subclasses

Core\Authentication_Token, Core\Configuration, Core\Session_Token, Core\Storage\Field, Core\View

Indirect known subclasses

Core\Authentication\Driver\ldap_Token, Core\Authentication\Driver\sspi_Token, Core\View\Driver\coreui, Core\View\Driver\html, Core\View\Driver\htmlbuilder, Core\View\Driver\plain, Core\View\Driver\yui, Core\Authentication\Driver\storage_Token, Core\Configuration\Driver\constant, Core\Configuration\Driver\ini, Core\Configuration\Driver\yaml, Core\Storage\Field\Aggregate, Core\Storage\Field\Element, Core\Storage\Field\Element\Pair, Core\Storage\Field\Element\Retained

Namespace: Core\Field
Package: Core\KDC
Since: 3.0
Requires: PHP 5.3
Version: 1.1
Located at Field/Mutable.inc.php

Methods summary

public mixed
# setDataForKey( string $key, mixed $value )

Updates an internal data storage field for a specified key using the following order:

Updates an internal data storage field for a specified key using the following order:

  • If a method named writeKey exists, the update is handled by that method;

  • otherwise a buffered value from the internal core cache with the given field name is updated;

  • if no such buffered field exists, Core\Field\Mutable::setDataForUndefinedKey() is called.

Parameters

$key
Name of data field to update value for.
$value
New data field value.

Returns

mixed

true, if a buffered cache field was updated, otherwise the return value of the called method is returned.

Since

3.0

Implementation of

Core\Variator::setDataForKey()
public mixed
# setDataForUndefinedKey( string $key, mixed $value )

Updates an internal data storage field for a specified key.

Updates an internal data storage field for a specified key.

The method is always called, when Core\Field\Mutable::setDataForKey() fails.

Parameters

$key
Name of data field to update value for.
$value
New data field value.

Returns

mixed
The return value depends on the reimplementation.

Throws

Core\Exception\UndefinedKey
No data field identified by the given key exists.

Remark

The default implementation throws an Core\Exception\UndefinedKey exception.


Since

3.0
public
# setDataForKeys( array $values )

Updates data storage fields for an associative array of keys.

Updates data storage fields for an associative array of keys.

Parameters

$values
Associative array of data field names and updated values.

Throws

Core\Exception\UndefinedKey
No data field identified by a given key exists.

Remark

The default implementation calls Core\Field\Mutable::setDataForKey() for each key and value pair. Derived classes should override this method with an optimised variant.


Since

3.0

Implementation of

Core\Variator::setDataForKeys()
public
# setKeyMasquerade( string $key, string $className = 'Core\\String\\Encrypted' )

Enables value masquerade for a specified key using a given class. If a value with the specified key exists and no value masquerade is yet active, it is masqueraded instantly; otherwise the value is de-masqueraded and masqueraded using the new class name.

Enables value masquerade for a specified key using a given class. If a value with the specified key exists and no value masquerade is yet active, it is masqueraded instantly; otherwise the value is de-masqueraded and masqueraded using the new class name.

Parameters

$key
Name of data field to masquerade value for.
$className

Class name used to masquerade value. Must implement the Masquerade interface. Defaults to the standard Core string encryption class name.

Throws

Core\Exception\InvalidClassName

The provided class name does not implement the Core\Masquerade interface.


Core\Exception\InvalidArgument

The value type identified by the given key is not supported by the provided masquerade class.

Since

3.1
public
# offsetSet( string $key, mixed $value )

Updates a value from the internal data storage and enables array assignment invocations.

Updates a value from the internal data storage and enables array assignment invocations.

Parameters

$key
Name of data field to update value for.
$value
New data field value.

Throws

Core\Exception\UndefinedKey
No data field identified by the given key exists.

Since

3.0

Overrides

Core\Field::offsetSet

Implementation of

ArrayAccess::offsetSet()
public
# offsetUnset( string $key )

Updates a value from the internal data storage to null. Enables unset() array invocations.

Updates a value from the internal data storage to null. Enables unset() array invocations.

Parameters

$key
Name of data field to unset value for.

Throws

Core\Exception\UndefinedKey
No data field identified by the given key exists.

Since

3.0

Overrides

Core\Field::offsetUnset

Implementation of

ArrayAccess::offsetUnset()
public
# updateMasqueradedKeys( )

Tests, whether a data element requires masquerade and updates values accordingly.

Tests, whether a data element requires masquerade and updates values accordingly.

Throws

Core\Exception\InvalidArgument

The value type identified by a data key is not supported by the provided masquerade class.

Remark

This method is usually only used by subclasses.

Since

3.1

Methods inherited from Core\Field

getDataForKey(), getDataForKeys(), getDataForUndefinedKey(), 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 $_v_masqueradedKeys

Array of key names that use value masquerade. If no valuemasquerade is used, the stored value is \c null.

Array of key names that use value masquerade. If no valuemasquerade is used, the stored value is \c null.

Since

3.1
#

Properties inherited from Core\Field

$_v_data

Magic properties

public read-only array $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