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.

ingo herwig

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

Implements Format.

Definition at line 46 of file HtmlFormat.php.

isCached ( Response  $response)
See also

Implements Format.

Definition at line 53 of file HtmlFormat.php.

getCacheDate ( Response  $response)
See also

Implements Format.

Definition at line 65 of file HtmlFormat.php.

deserializeValues ( Request  $request)
See also

Definition at line 77 of file HtmlFormat.php.

serializeValues ( Response  $response)
See also

Definition at line 99 of file HtmlFormat.php.

static getValueDefFromInputControlName (   $name)

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

$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
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)

Get the template file for the given response.


Definition at line 145 of file HtmlFormat.php.