eZPublishCommunityProject  2012.12
eZ\Publish\Core\REST\Common\FieldTypeProcessor Interface Reference

FieldTypeProcessor. More...

+ Inheritance diagram for eZ\Publish\Core\REST\Common\FieldTypeProcessor:

Public Member Functions

 postProcessHash ($outgoingValueHash)
 Perform manipulations on an a generated $outgoingValueHash. More...
 
 preProcessHash ($incomingValueHash)
 Perform manipulations on a received $incomingValueHash. More...
 

Detailed Description

Member Function Documentation

eZ\Publish\Core\REST\Common\FieldTypeProcessor::postProcessHash (   $outgoingValueHash)

Perform manipulations on an a generated $outgoingValueHash.

This method is called by the REST server to allow a field type to post process the given $outgoingValueHash, which was previously generated using ::toHash(), before it is sent to the client. The return value of this method replaces $outgoingValueHash and must obey to the same rules as the original $outgoingValueHash.

Parameters
mixed$outgoingValueHash
Returns
mixed Post processed hash

Implemented in eZ\Publish\Core\REST\Server\FieldTypeProcessor\ImageProcessor, and eZ\Publish\Core\REST\Server\FieldTypeProcessor\BinaryProcessor.

eZ\Publish\Core\REST\Common\FieldTypeProcessor::preProcessHash (   $incomingValueHash)

Perform manipulations on a received $incomingValueHash.

This method is called by the REST server to allow a field type to pre process the given $incomingValueHash before it is handled by ::fromHash(). The $incomingValueHash can be expected to conform to the rules that need to apply to hashes accepted by fromHash(). The return value of this method replaces the $incomingValueHash.

Parameters
mixed$incomingValueHash
Returns
mixed Pre processed hash

Implemented in eZ\Publish\Core\REST\Server\FieldTypeProcessor\BinaryInputProcessor.


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