ResponseDocument Interface Reference

Detailed Description

ResponseDocument is the interface for media returned in a response when using the DownloadFormat.

Implementations are responsible for providing the response body content and mime type information.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 20 of file ResponseDocument.php.

+ Inheritance diagram for ResponseDocument:

Public Member Functions

 getMimeType ()
 
 isDownload ()
 
 getFilename ()
 
 getCacheDate ()
 
 getContent ()
 
 output ()
 

Member Function Documentation

◆ getMimeType()

getMimeType ( )

Get the MIME type of the document.

Returns
String

Implemented in AbstractDocument.

◆ isDownload()

isDownload ( )

Determine whether the document should be return as download or not.

Returns
Boolean

Implemented in AbstractDocument.

◆ getFilename()

getFilename ( )

Get the filename used in the 'Content-Disposition' header when used as a download.

Returns
String

Implemented in AbstractDocument.

◆ getCacheDate()

getCacheDate ( )

Get the cache date of the document, if it is cached locally.

Returns
DateTime or null

Implemented in AbstractDocument, and FileDocument.

◆ getContent()

getContent ( )

Get the content of the document NOTE The result might be null depending on the implementation.

Returns
String

Implemented in FileDocument, RemoteDocument, and MemoryDocument.

◆ output()

output ( )

Output the document using echo.

Implemented in FileDocument, RemoteDocument, and MemoryDocument.