Detailed Description

AbstractFormat is used as base class for specialized formats.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 27 of file AbstractFormat.php.

+ Inheritance diagram for AbstractFormat:

Public Member Functions

 deserialize (Request $request)
 
 serialize (Response $response)
 
 getResponseHeaders (Response $response)
 
- Public Member Functions inherited from Format
 getMimeType ()
 
 isCached (Response $response)
 
 getCacheDate (Response $response)
 

Protected Member Functions

 beforeDeserialize (Request $request)
 
 deserializeValues (Request $request)
 
 afterDeserialize (Request $request)
 
 beforeSerialize (Response $response)
 
 serializeValues (Response $response)
 
 afterSerialize (Response $response)
 
 getNode (ObjectId $oid)
 
 filterValue ($value, AttributeDescription $attribute)
 

Member Function Documentation

deserialize ( Request  $request)
See also
Format::deserialize()

Implements Format.

Definition at line 34 of file AbstractFormat.php.

serialize ( Response  $response)
See also
Format::serialize()

Implements Format.

Definition at line 43 of file AbstractFormat.php.

getResponseHeaders ( Response  $response)
See also
Format::getResponseHeaders()

Implements Format.

Definition at line 52 of file AbstractFormat.php.

beforeDeserialize ( Request  $request)
protected

Modify data before deserialization.

The default implementation does nothing.

Parameters
$requestThe request
Returns
Array/object of values
Note
Subclasses override this if necessary

Definition at line 63 of file AbstractFormat.php.

deserializeValues ( Request  $request)
abstractprotected

Deserialize an array of values.

Parameters
$requestThe request
Returns
Array/object of values
afterDeserialize ( Request  $request)
protected

Modify data after deserialization.

The default implementation does nothing.

Parameters
$requestThe request
Returns
Array/object of values
Note
Subclasses override this if necessary

Definition at line 80 of file AbstractFormat.php.

beforeSerialize ( Response  $response)
protected

Modify data before serialization.

The default implementation does nothing.

Parameters
$responseThe response
Returns
Array/object of values
Note
Subclasses override this if necessary

Definition at line 90 of file AbstractFormat.php.

serializeValues ( Response  $response)
abstractprotected

Serialize an array of values.

Parameters
$responseThe response
Returns
Array/object of values
afterSerialize ( Response  $response)
protected

Modify data after serialization.

The default implementation does nothing.

Parameters
$responseThe response
Returns
Array/object of values
Note
Subclasses override this if necessary

Definition at line 107 of file AbstractFormat.php.

getNode ( ObjectId  $oid)
protected

Helper methods.

Get a node with the given oid to deserialize values from form fields into it. The method ensures that there is only one instance per oid.

Parameters
$oidThe oid
Returns
Node

Definition at line 121 of file AbstractFormat.php.

filterValue (   $value,
AttributeDescription  $attribute 
)
protected

Definition at line 140 of file AbstractFormat.php.