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-language-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 39 of file HtmlFormat.php.

+ Inheritance diagram for HtmlFormat:

Public Member Functions

 getMimeType (Response $response=null)
 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)
 afterDeserialize (Request $request)
 beforeSerialize (Response $response)
 afterSerialize (Response $response)
 getNode (ObjectId $oid)
 filterValue ($value, AttributeDescription $attribute)

Static Protected Member Functions

static getValueDefFromInputControlName ($name)

Member Function Documentation

◆ getMimeType()

getMimeType ( Response  $response = null)
See also

Implements Format.

Definition at line 47 of file HtmlFormat.php.

◆ isCached()

isCached ( Response  $response)
See also

Implements Format.

Definition at line 54 of file HtmlFormat.php.

◆ getCacheDate()

getCacheDate ( Response  $response)
See also

Implements Format.

Definition at line 66 of file HtmlFormat.php.

◆ deserializeValues()

deserializeValues ( Request  $request)
See also

Reimplemented from AbstractFormat.

Definition at line 78 of file HtmlFormat.php.

◆ serializeValues()

serializeValues ( Response  $response)
See also

Reimplemented from AbstractFormat.

Definition at line 107 of file HtmlFormat.php.

◆ getValueDefFromInputControlName()

static getValueDefFromInputControlName (   $name)

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

$nameThe name of input field in the format value-language-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 130 of file HtmlFormat.php.

◆ getTemplateFile()

getTemplateFile ( Response  $response)

Get the template file for the given response.


Definition at line 152 of file HtmlFormat.php.