BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
DataValues\UnDeserializableValue Class Reference
Inheritance diagram for DataValues\UnDeserializableValue:
Collaboration diagram for DataValues\UnDeserializableValue:

Public Member Functions

 __construct ($data, $type, $error)
 
 serialize ()
 
 unserialize ($value)
 
 getArrayValue ()
 
 toArray ()
 
 getTargetType ()
 
 getReason ()
 
 getSortKey ()
 
 getValue ()
 
 equals ($value)
 
- Public Member Functions inherited from DataValues\DataValueObject
 getHash ()
 
 equals ($value)
 
 getCopy ()
 
 getArrayValue ()
 
 toArray ()
 

Static Public Member Functions

static getType ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from DataValues\DataValueObject
static requireArrayFields ($data, array $fields)
 

Detailed Description

Class representing a value that could not be unserialized for some reason. It contains the raw native data structure representing the value, as well as the originally intended value type and an error message.

Since
0.1

GNU GPL v2+

Author
Daniel Kinzler

Constructor & Destructor Documentation

DataValues\UnDeserializableValue::__construct (   $data,
  $type,
  $error 
)
Since
0.1
Parameters
string$typeThe originally intended type
mixed$dataThe raw data structure
string$errorThe error that occurred when processing the original data structure.
Exceptions
InvalidArgumentException

Member Function Documentation

DataValues\UnDeserializableValue::equals (   $value)
See Also
Comparable::equals
Since
0.1
Parameters
mixed$value
Returns
bool

Implements Comparable.

DataValues\UnDeserializableValue::getArrayValue ( )
See Also
DataValue::getArrayValue
Note
: this returns the original raw data structure.
Since
0.1
Returns
mixed

Implements DataValues\DataValue.

DataValues\UnDeserializableValue::getReason ( )

Returns a string describing the issue that caused the failure represented by this UnDeserializableValue object.

Since
0.1
Returns
string
DataValues\UnDeserializableValue::getSortKey ( )
See Also
DataValue::getSortKey
Since
0.1
Returns
int Always 0 in this implementation.

Implements DataValues\DataValue.

DataValues\UnDeserializableValue::getTargetType ( )

Returns the value type that was intended for the bad data structure.

Since
0.1
Returns
string
static DataValues\UnDeserializableValue::getType ( )
static
See Also
DataValue::getType
Since
0.1
Returns
string

Implements DataValues\DataValue.

DataValues\UnDeserializableValue::getValue ( )

Returns the raw data structure.

See Also
DataValue::getValue
Since
0.1
Returns
mixed

Implements DataValues\DataValue.

DataValues\UnDeserializableValue::serialize ( )
See Also
Serializable::serialize
Note
: The serialization includes the intended type and the error message along with the original data.
Since
0.1
Returns
string

Implements Serializable.

DataValues\UnDeserializableValue::toArray ( )
See Also
DataValue::toArray
Note
: This uses the originally intended type. This way, the native representation does not model a UnDeserializableValue, but the originally intended type of value. This allows for round trip compatibility with unknown types of data.
Since
0.1
Returns
array

Implements DataValues\DataValue.

DataValues\UnDeserializableValue::unserialize (   $value)
See Also
Serializable::unserialize
Since
0.1
Parameters
string$value
Returns
StringValue

Implements Serializable.


The documentation for this class was generated from the following file: