Class Converter
A Converter takes a constant data source and returns a transformed value. The interface is very similar to an Encoder or Decoder, but a Converter is not designed to work on streaming data sources. Additionally, the performed transformation is in general not reversible.
- Core\Object implements Core\Chainable
- Core\Set implements Core\Accessor
- Core\Set\Mutable implements Core\Mutator
- Core\Field implements Core\Inquiry
- Core\Converter
Direct known subclasses
Namespace: Core
Package: Core\Converter
Since: 3.0
Requires: PHP 5.3
Version: 1.0
Located at Converter.inc.php
Methods summary
public
mixed
|
|
public static
|
|
public
integer|boolean
|
#
chain(
Connects another object to the current object. Usage depends on the actual class implementation; common examples are lazy configuration completion or layer expansions. Allows chaining of a successor Converter (at end of chain or replace with corresponding flag set) instance or an Inquiry data source. |
public
mixed
|
|
public
mixed
|
#
getDataForUndefinedKey( string $key )
Retrieves a value from the assigned data source and converts it automatically. |
Methods inherited from Core\Field
getDataForKey()
,
getDataForKeys()
,
issetDataForKey()
,
offsetExists()
,
offsetGet()
,
offsetSet()
,
offsetUnset()
Methods inherited from Core\Set\Mutable
Methods inherited from Core\Object
__autocreateFactory()
,
__call()
,
__processParameters()
,
__toString()
,
attachMethod()
,
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_dataSource
Assigned data source (an Inquiry), if any. |
|
protected
|
$_v_successor
Subsequent (chained) converter layer, if any. |
Properties inherited from Core\Field
Magic properties
public read-only
|
$dataSource
Assigned data source. |
public read-only
|
$successor
Chained successor converter. |