Detailed Description

HtmlFormat realizes the HTML request/response format.

Since all data from the external representation arrives in form fields, grouping of values has to be done via the field names. So Nodes are represented by their values whose field names are of the form value-name-oid. All of these values will be removed from the request and replaced by Node instances representing the data. Each node is stored under its object id in the data array.

HtmlFormat serializes the response to a template, which will be rendered by the View implementation defined in the configuration section 'view'. The template is determined by the current action key. The response property 'html_tpl_format' allows to select a specific version of that template file. E.g. if the template would be home.tpl, setting the 'html_tpl_format' property to 'mobile' would select the template home-mobile.tpl. If a version does not exist, it is ignored and the default template is used.

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

Definition at line 36 of file HtmlFormat.php.

+ Inheritance diagram for HtmlFormat:

Public Member Functions

 getMimeType ()
 
- Public Member Functions inherited from AbstractFormat
 deserialize (Request $request)
 
 serialize (Response $response)
 

Protected Member Functions

 deserializeValues ($values)
 
 serializeValues ($values)
 
- Protected Member Functions inherited from AbstractFormat
 getRequest ()
 
 getResponse ()
 
 beforeDeserialize ($values)
 
 deserializeValues ($values)
 
 afterDeserialize ($values)
 
 beforeSerialize ($values)
 
 serializeValues ($values)
 
 afterSerialize ($values)
 
 getNode (ObjectId $oid)
 
 filterValue ($value, AttributeDescription $attribute)
 

Static Protected Member Functions

static getValueDefFromInputControlName ($name)
 

Member Function Documentation

getMimeType ( )
See also
Format::getMimeType()

Implements Format.

Definition at line 43 of file HtmlFormat.php.

deserializeValues (   $values)
protected
See also
AbstractFormat::deserializeValues()

Definition at line 50 of file HtmlFormat.php.

serializeValues (   $values)
protected
See also
AbstractFormat::serializeValues()

Definition at line 71 of file HtmlFormat.php.

static getValueDefFromInputControlName (   $name)
staticprotected

Get the object value definition from a HTML input field name.

Parameters
$nameThe name of input field in the format value-name-oid, where name is the name of the attribute belonging to the node defined by oid
Returns
An associative array with keys 'oid', 'language', 'name' or null if the name is not valid

Definition at line 113 of file HtmlFormat.php.