Detailed Description

HtmlFormat implements 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 38 of file HtmlFormat.php.

+ Inheritance diagram for HtmlFormat:

Public Member Functions

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

Protected Member Functions

 deserializeValues (Request $request)
 
 serializeValues (Response $response)
 
 getTemplateFile (Response $response)
 
- Protected Member Functions inherited from AbstractFormat
 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)
 

Static Protected Member Functions

static getValueDefFromInputControlName ($name)
 

Member Function Documentation

getMimeType ( )
See also
Format::getMimeType()

Implements Format.

Definition at line 46 of file HtmlFormat.php.

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

Implements Format.

Definition at line 53 of file HtmlFormat.php.

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

Implements Format.

Definition at line 65 of file HtmlFormat.php.

deserializeValues ( Request  $request)
protected
See also
AbstractFormat::deserializeValues()

Definition at line 77 of file HtmlFormat.php.

serializeValues ( Response  $response)
protected
See also
AbstractFormat::serializeValues()

Definition at line 99 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 123 of file HtmlFormat.php.

getTemplateFile ( Response  $response)
protected

Get the template file for the given response.

Parameters
$response

Definition at line 145 of file HtmlFormat.php.