summaryrefslogtreecommitdiffstats
path: root/lib/public/response.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/response.php')
-rw-r--r--lib/public/response.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/public/response.php b/lib/public/response.php
index d4d32e89ab7..1942c1ec373 100644
--- a/lib/public/response.php
+++ b/lib/public/response.php
@@ -36,6 +36,7 @@ namespace OCP;
/**
* This class provides convenient functions to send the correct http response headers
+ * @since 4.0.0
*/
class Response {
/**
@@ -44,6 +45,7 @@ class Response {
* >0 cache time in seconds
* 0 and <0 enable default browser caching
* null cache indefinitly
+ * @since 4.0.0
*/
static public function enableCaching( $cache_time = null ) {
\OC_Response::enableCaching( $cache_time );
@@ -53,6 +55,7 @@ class Response {
* Checks and set Last-Modified header, when the request matches sends a
* 'not modified' response
* @param string $lastModified time when the reponse was last modified
+ * @since 4.0.0
*/
static public function setLastModifiedHeader( $lastModified ) {
\OC_Response::setLastModifiedHeader( $lastModified );
@@ -62,6 +65,7 @@ class Response {
* Sets the content disposition header (with possible workarounds)
* @param string $filename file name
* @param string $type disposition type, either 'attachment' or 'inline'
+ * @since 7.0.0
*/
static public function setContentDispositionHeader( $filename, $type = 'attachment' ) {
\OC_Response::setContentDispositionHeader( $filename, $type );
@@ -70,6 +74,7 @@ class Response {
/**
* Sets the content length header (with possible workarounds)
* @param string|int|float $length Length to be sent
+ * @since 8.1.0
*/
static public function setContentLengthHeader($length) {
\OC_Response::setContentLengthHeader($length);
@@ -78,6 +83,7 @@ class Response {
/**
* Disable browser caching
* @see enableCaching with cache_time = 0
+ * @since 4.0.0
*/
static public function disableCaching() {
\OC_Response::disableCaching();
@@ -87,6 +93,7 @@ class Response {
* Checks and set ETag header, when the request matches sends a
* 'not modified' response
* @param string $etag token to use for modification check
+ * @since 4.0.0
*/
static public function setETagHeader( $etag ) {
\OC_Response::setETagHeader( $etag );
@@ -95,6 +102,7 @@ class Response {
/**
* Send file as response, checking and setting caching headers
* @param string $filepath of file to send
+ * @since 4.0.0
*/
static public function sendFile( $filepath ) {
\OC_Response::sendFile( $filepath );
@@ -105,6 +113,7 @@ class Response {
* @param string|\DateTime $expires date-time when the response expires
* string for DateInterval from now
* DateTime object when to expire response
+ * @since 4.0.0
*/
static public function setExpiresHeader( $expires ) {
\OC_Response::setExpiresHeader( $expires );
@@ -113,6 +122,7 @@ class Response {
/**
* Send redirect response
* @param string $location to redirect to
+ * @since 4.0.0
*/
static public function redirect( $location ) {
\OC_Response::redirect( $location );