* This class provides convinient functions to send the correct http response headers
*/
class Response {
-
-
/**
* @brief Enable response caching by sending correct HTTP headers
* @param $cache_time time to cache the response
return(\OC_Response::enableCaching( $cache_time ));
}
-
/**
* Checks and set Last-Modified header, when the request matches sends a
* 'not modified' response
return(\OC_Response::setLastModifiedHeader( $lastModified ));
}
-
/**
* @brief disable browser caching
* @see enableCaching with cache_time = 0
return(\OC_Response::disableCaching());
}
-
/**
* Checks and set ETag header, when the request matches sends a
* 'not modified' response
return(\OC_Response::setETagHeader( $etag ));
}
-
/**
* @brief Send file as response, checking and setting caching headers
* @param $filepath of file to send
static public function redirect( $location ) {
return(\OC_Response::redirect( $location ));
}
-
-
-}
+}
\ No newline at end of file