Stud.IP  3.1 Revision 48552
 All Data Structures Namespaces Files Functions Variables Groups Pages
DefaultRenderer Class Reference
Inheritance diagram for DefaultRenderer:
Inheritance graph
Collaboration diagram for DefaultRenderer:
Collaboration graph

Public Member Functions

 contentType ()
 extension ()
 render ($response)
 shouldRespondTo ($filename, $media_range=null)

Detailed Description

Default base content renderer class (outputs text/plain).

Content renderers are output filters that can reshape data before it is sent to the client. Each content renderer is associated with a certain content type and a certain file extension. This is neccessary for content negotiation.

Author
Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m
mlunz.nosp@m.ena@.nosp@m.uos.d.nosp@m.e GPL 2 or later
Since
Stud.IP 3.0

Member Function Documentation

contentType ( )

Returns an associated content type.

Returns
String Content/mime type for this renderer

Reimplemented in DebugRenderer, and JSONRenderer.

Here is the caller graph for this function:

extension ( )

Returns an associated extension.

Returns
String Associated extension for this renderer.

Reimplemented in DebugRenderer, and JSONRenderer.

Here is the caller graph for this function:

render (   $response)

Response transformation function.

Parameters
\RESTAPI\Response$responsethe response to transform

Reimplemented in DebugRenderer, and JSONRenderer.

Here is the call graph for this function:

shouldRespondTo (   $filename,
  $media_range = null 
)

Detects whether the renderer should respond to either a certain filename (tests by extension) or to a certain media range.

Parameters
String$filenameFilename to test against
mixed$media_rangeMedia range to test against (optional, defaults to request's accept header if set)
Returns
bool Returns whether the renderer should respond

Here is the call graph for this function:


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