ResponseDocument.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2020 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of the MIT License.
7  *
8  * See the LICENSE file distributed with this work for
9  * additional information.
10  */
11 namespace wcmf\lib\presentation;
12 
13 /**
14  * ResponseDocument is the interface for media returned in a response when
15  * using the DownloadFormat. Implementations are responsible for providing
16  * the response body content and mime type information.
17  *
18  * @author ingo herwig <ingo@wemove.com>
19  */
20 interface ResponseDocument {
21 
22  /**
23  * Get the MIME type of the document
24  * @return String
25  */
26  public function getMimeType();
27 
28  /**
29  * Determine whether the document should be return as download or not
30  * @return Boolean
31  */
32  public function isDownload();
33 
34  /**
35  * Get the filename used in the 'Content-Disposition' header when used as a download
36  * @return String
37  */
38  public function getFilename();
39 
40  /**
41  * Get the cache date of the document, if it is cached locally
42  * @return DateTime or null
43  */
44  public function getCacheDate();
45 
46  /**
47  * Get the content of the document
48  * NOTE The result might be null depending on the implementation
49  * @return String
50  */
51  public function getContent();
52 
53  /**
54  * Output the document using echo
55  */
56  public function output();
57 }
58 ?>
getContent()
Get the content of the document NOTE The result might be null depending on the implementation.
getFilename()
Get the filename used in the 'Content-Disposition' header when used as a download.
getMimeType()
Get the MIME type of the document.
ResponseDocument is the interface for media returned in a response when using the DownloadFormat.
getCacheDate()
Get the cache date of the document, if it is cached locally.
output()
Output the document using echo.
isDownload()
Determine whether the document should be return as download or not.
Presentation related interfaces and classes.
Definition: namespaces.php:59