| 
    Stud.IP
    trunk Revision
    
   | 
  


Public Member Functions | |
| contentType () | |
| extension () | |
| render ($response) | |
| shouldRespondTo ($filename, $media_range=null) | |
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.
| contentType | ( | ) | 
Returns an associated content type.
Reimplemented in DebugRenderer, and JSONRenderer.

| extension | ( | ) | 
Returns an associated extension.
Reimplemented in DebugRenderer, and JSONRenderer.

| render | ( | $response | ) | 
Response transformation function.
| \RESTAPI\Response | $response | the response to transform | 
Reimplemented in DebugRenderer, and JSONRenderer.

| 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.
| String | $filename | Filename to test against | 
| mixed | $media_range | Media range to test against (optional, defaults to request's accept header if set) | 
