Class Field
Mutable storage field interface with optional data cache support.
Derived classes may implement get* and set* methods to perform specialised
data transformations.
- Core\Object implements Core\Chainable
-
Core\Set
implements
Core\Accessor
-
Core\Set\Mutable
implements
Core\Mutator
-
Core\Field
implements
Core\Inquiry
-
Core\Field\Mutable
implements
Core\Variator
-
Core\Storage\Field
Direct known subclasses
Indirect known subclasses
Core\Storage\Field\Element\Pair,
Core\Storage\Field\Element\Retained
Package: Core\Storage
Since: 3.0
Requires: PHP 5.3
Version: 1.1
Located at Storage/Field.inc.php
Methods summary
public
|
#
__construct(
|
public
boolean
|
|
public
mixed
|
#
getDataForUndefinedKey( string $key )
Fetches a value from the storage back-end (ignoring the cache). |
public
|
|
public
true
|
#
setDataForKey( string $key, mixed $value )
Updates a value directly on the storage back-end. The internally cached value (if caching is used) is updated as well. |
public
mixed
|
#
setDataForUndefinedKey( string $key, mixed $value )
Updates a value directly on the storage back-end. The internally cached value (if caching is used) is updated as well. Does not invoke any write method. |
Methods inherited from Core\Field\Mutable
offsetSet(),
offsetUnset(),
setDataForKeys(),
setKeyMasquerade(),
updateMasqueradedKeys()
Methods inherited from Core\Field
getDataForKey(),
getDataForKeys(),
issetDataForKey(),
offsetExists(),
offsetGet()
Methods inherited from Core\Set\Mutable
Methods inherited from Core\Object
__autocreateFactory(),
__call(),
__processParameters(),
__toString(),
attachMethod(),
chain(),
getValueForKey(),
getValueForKeyPath(),
getValueForUndefinedKey(),
hash(),
issetValueForKey(),
setValueForKey(),
setValueForKeyPath(),
setValueForUndefinedKey(),
uuid()
Constants summary
integer |
NoCache
Cache mode that does not cache any value retrieved from the storage back-end. Fields are on request always fetched directly from the back-end. |
#
0
|
integer |
IncrementalCache
Cache mode that automatically caches all values once they were retrieved from the back-end. |
#
1
|
integer |
FullCache
Cache mode that initially retrieves and cache all values from the back-end on first request. |
#
2
|
Constants inherited from Core\Object
AnyParameterType,
AutochainParameterType,
AutocreateParameterType,
BooleanParameterType,
CharParameterType,
EnumParameterType,
IntegerParameterType,
RealParameterType,
StringParameterType,
UserParameterType
Properties summary
protected
integer
|
$_v_cacheMode
Currently set cache mode. |
#
self::NoCache
|
protected
|
$_v_conditional
Pre-configured conditional to match the storage entry of the field instance. |
|
protected
|
$_v_driver
Storage driver. |
|
protected
|
$_v_reference
Reference that contains the field data. |
|
protected
|
$_v_virtualData
Associative array of virtual data fields. Array keys designate the name of a virtual data field, the value is an array of transformation callbacks to construct accessor nodes for retrieving and setting the virtual data key. |
Properties inherited from Core\Field\Mutable
Properties inherited from Core\Field
Magic properties
public read-only
integer
|
$cacheMode
Currently set cache mode. |
public read-only
|
$conditional
Conditional to identify the storage entry represented by this field. |
public read-only
|
$driver
Storage driver. |
public read-only
|
$reference
Reference that contains the field data. |
public read-only
array
|
$virtualData
Associative array of virtual data fields. |