summaryrefslogtreecommitdiffstats
path: root/lib/public/appframework/http
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-04-17 09:13:04 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-17 09:13:04 +0200
commit852cc6f2c643fa5f84c48b3bea84783512324129 (patch)
tree9c6793db76dca099c92bc71d05d80d39b4694267 /lib/public/appframework/http
parentda44df2cfae16f396316816f75f0900c24015e96 (diff)
parent7644950b48b094bfe5675348aefb7cf5747d325b (diff)
downloadnextcloud-server-852cc6f2c643fa5f84c48b3bea84783512324129.tar.gz
nextcloud-server-852cc6f2c643fa5f84c48b3bea84783512324129.zip
Merge pull request #15680 from owncloud/add-since-tags-to-public-namespace
Add @since tags to all methods in public namespace
Diffstat (limited to 'lib/public/appframework/http')
-rw-r--r--lib/public/appframework/http/contentsecuritypolicy.php14
-rw-r--r--lib/public/appframework/http/datadisplayresponse.php10
-rw-r--r--lib/public/appframework/http/datadownloadresponse.php9
-rw-r--r--lib/public/appframework/http/dataresponse.php4
-rw-r--r--lib/public/appframework/http/downloadresponse.php2
-rw-r--r--lib/public/appframework/http/icallbackresponse.php2
-rw-r--r--lib/public/appframework/http/ioutput.php7
-rw-r--r--lib/public/appframework/http/jsonresponse.php5
-rw-r--r--lib/public/appframework/http/notfoundresponse.php5
-rw-r--r--lib/public/appframework/http/ocsresponse.php9
-rw-r--r--lib/public/appframework/http/redirectresponse.php3
-rw-r--r--lib/public/appframework/http/response.php27
-rw-r--r--lib/public/appframework/http/streamresponse.php3
-rw-r--r--lib/public/appframework/http/templateresponse.php8
14 files changed, 102 insertions, 6 deletions
diff --git a/lib/public/appframework/http/contentsecuritypolicy.php b/lib/public/appframework/http/contentsecuritypolicy.php
index 6c527879698..be4b6e60f97 100644
--- a/lib/public/appframework/http/contentsecuritypolicy.php
+++ b/lib/public/appframework/http/contentsecuritypolicy.php
@@ -35,6 +35,7 @@ use OCP\AppFramework\Http;
* should require no modification at all for most use-cases.
*
* @package OCP\AppFramework\Http
+ * @since 8.1.0
*/
class ContentSecurityPolicy {
/** @var bool Whether inline JS snippets are allowed */
@@ -86,6 +87,7 @@ class ContentSecurityPolicy {
* Whether inline JavaScript snippets are allowed or forbidden
* @param bool $state
* @return $this
+ * @since 8.1.0
*/
public function allowInlineScript($state = false) {
$this->inlineScriptAllowed = $state;
@@ -96,6 +98,7 @@ class ContentSecurityPolicy {
* Whether eval in JavaScript is allowed or forbidden
* @param bool $state
* @return $this
+ * @since 8.1.0
*/
public function allowEvalScript($state = true) {
$this->evalScriptAllowed= $state;
@@ -107,6 +110,7 @@ class ContentSecurityPolicy {
* allow JavaScript from all domains.
* @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
* @return $this
+ * @since 8.1.0
*/
public function addAllowedScriptDomain($domain) {
$this->allowedScriptDomains[] = $domain;
@@ -117,6 +121,7 @@ class ContentSecurityPolicy {
* Whether inline CSS snippets are allowed or forbidden
* @param bool $state
* @return $this
+ * @since 8.1.0
*/
public function allowInlineStyle($state = true) {
$this->inlineStyleAllowed = $state;
@@ -128,6 +133,7 @@ class ContentSecurityPolicy {
* CSS from all domains.
* @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
* @return $this
+ * @since 8.1.0
*/
public function addAllowedStyleDomain($domain) {
$this->allowedStyleDomains[] = $domain;
@@ -139,6 +145,7 @@ class ContentSecurityPolicy {
* fonts from all domains.
* @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
* @return $this
+ * @since 8.1.0
*/
public function addAllowedFontDomain($domain) {
$this->allowedFontDomains[] = $domain;
@@ -150,6 +157,7 @@ class ContentSecurityPolicy {
* images from all domains.
* @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
* @return $this
+ * @since 8.1.0
*/
public function addAllowedImageDomain($domain) {
$this->allowedImageDomains[] = $domain;
@@ -160,6 +168,7 @@ class ContentSecurityPolicy {
* To which remote domains the JS connect to.
* @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
* @return $this
+ * @since 8.1.0
*/
public function addAllowedConnectDomain($domain) {
$this->allowedConnectDomains[] = $domain;
@@ -170,6 +179,7 @@ class ContentSecurityPolicy {
* From whoch domains media elements can be embedded.
* @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
* @return $this
+ * @since 8.1.0
*/
public function addAllowedMediaDomain($domain) {
$this->allowedMediaDomains[] = $domain;
@@ -180,6 +190,7 @@ class ContentSecurityPolicy {
* From which domains objects such as <object>, <embed> or <applet> are executed
* @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
* @return $this
+ * @since 8.1.0
*/
public function addAllowedObjectDomain($domain) {
$this->allowedObjectDomains[] = $domain;
@@ -190,6 +201,7 @@ class ContentSecurityPolicy {
* Which domains can be embedded in an iframe
* @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
* @return $this
+ * @since 8.1.0
*/
public function addAllowedFrameDomain($domain) {
$this->allowedFrameDomains[] = $domain;
@@ -200,6 +212,7 @@ class ContentSecurityPolicy {
* Domains from which web-workers and nested browsing content can load elements
* @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
* @return $this
+ * @since 8.1.0
*/
public function addAllowedChildSrcDomain($domain) {
$this->allowedChildSrcDomains[] = $domain;
@@ -209,6 +222,7 @@ class ContentSecurityPolicy {
/**
* Get the generated Content-Security-Policy as a string
* @return string
+ * @since 8.1.0
*/
public function buildPolicy() {
$policy = "default-src 'none';";
diff --git a/lib/public/appframework/http/datadisplayresponse.php b/lib/public/appframework/http/datadisplayresponse.php
index ebb77950c96..35272d0f823 100644
--- a/lib/public/appframework/http/datadisplayresponse.php
+++ b/lib/public/appframework/http/datadisplayresponse.php
@@ -23,6 +23,12 @@ namespace OCP\AppFramework\Http;
use OCP\AppFramework\Http;
+/**
+ * Class DataDisplayResponse
+ *
+ * @package OCP\AppFramework\Http
+ * @since 8.1.0
+ */
class DataDisplayResponse extends Response {
/**
@@ -36,6 +42,7 @@ class DataDisplayResponse extends Response {
* @param string $data the data to display
* @param int $statusCode the Http status code, defaults to 200
* @param array $headers additional key value based headers
+ * @since 8.1.0
*/
public function __construct($data="", $statusCode=Http::STATUS_OK,
$headers=[]) {
@@ -48,6 +55,7 @@ class DataDisplayResponse extends Response {
/**
* Outputs data. No processing is done.
* @return string
+ * @since 8.1.0
*/
public function render() {
return $this->data;
@@ -58,6 +66,7 @@ class DataDisplayResponse extends Response {
* Sets values in the data
* @param string $data the data to display
* @return DataDisplayResponse Reference to this object
+ * @since 8.1.0
*/
public function setData($data){
$this->data = $data;
@@ -69,6 +78,7 @@ class DataDisplayResponse extends Response {
/**
* Used to get the set parameters
* @return string the data
+ * @since 8.1.0
*/
public function getData(){
return $this->data;
diff --git a/lib/public/appframework/http/datadownloadresponse.php b/lib/public/appframework/http/datadownloadresponse.php
index 837023acb8a..612386f9801 100644
--- a/lib/public/appframework/http/datadownloadresponse.php
+++ b/lib/public/appframework/http/datadownloadresponse.php
@@ -21,6 +21,12 @@
*/
namespace OCP\AppFramework\Http;
+/**
+ * Class DataDownloadResponse
+ *
+ * @package OCP\AppFramework\Http
+ * @since 8.0.0
+ */
class DataDownloadResponse extends DownloadResponse {
/**
* @var string
@@ -32,6 +38,7 @@ class DataDownloadResponse extends DownloadResponse {
* @param string $data text to be downloaded
* @param string $filename the name that the downloaded file should have
* @param string $contentType the mimetype that the downloaded file should have
+ * @since 8.0.0
*/
public function __construct($data, $filename, $contentType) {
$this->data = $data;
@@ -40,6 +47,7 @@ class DataDownloadResponse extends DownloadResponse {
/**
* @param string $data
+ * @since 8.0.0
*/
public function setData($data) {
$this->data = $data;
@@ -47,6 +55,7 @@ class DataDownloadResponse extends DownloadResponse {
/**
* @return string
+ * @since 8.0.0
*/
public function render() {
return $this->data;
diff --git a/lib/public/appframework/http/dataresponse.php b/lib/public/appframework/http/dataresponse.php
index b86686ffe82..555faa6ea1a 100644
--- a/lib/public/appframework/http/dataresponse.php
+++ b/lib/public/appframework/http/dataresponse.php
@@ -32,6 +32,7 @@ use OCP\AppFramework\Http;
/**
* A generic DataResponse class that is used to return generic data responses
* for responders to transform
+ * @since 8.0.0
*/
class DataResponse extends Response {
@@ -46,6 +47,7 @@ class DataResponse extends Response {
* @param array|object $data the object or array that should be transformed
* @param int $statusCode the Http status code, defaults to 200
* @param array $headers additional key value based headers
+ * @since 8.0.0
*/
public function __construct($data=array(), $statusCode=Http::STATUS_OK,
array $headers=array()) {
@@ -59,6 +61,7 @@ class DataResponse extends Response {
* Sets values in the data json array
* @param array|object $data an array or object which will be transformed
* @return DataResponse Reference to this object
+ * @since 8.0.0
*/
public function setData($data){
$this->data = $data;
@@ -70,6 +73,7 @@ class DataResponse extends Response {
/**
* Used to get the set parameters
* @return array the data
+ * @since 8.0.0
*/
public function getData(){
return $this->data;
diff --git a/lib/public/appframework/http/downloadresponse.php b/lib/public/appframework/http/downloadresponse.php
index dfcc65ffea5..0b9a8bcc6d8 100644
--- a/lib/public/appframework/http/downloadresponse.php
+++ b/lib/public/appframework/http/downloadresponse.php
@@ -27,6 +27,7 @@ namespace OCP\AppFramework\Http;
/**
* Prompts the user to download the a file
+ * @since 7.0.0
*/
class DownloadResponse extends \OCP\AppFramework\Http\Response {
@@ -37,6 +38,7 @@ class DownloadResponse extends \OCP\AppFramework\Http\Response {
* Creates a response that prompts the user to download the file
* @param string $filename the name that the downloaded file should have
* @param string $contentType the mimetype that the downloaded file should have
+ * @since 7.0.0
*/
public function __construct($filename, $contentType) {
$this->filename = $filename;
diff --git a/lib/public/appframework/http/icallbackresponse.php b/lib/public/appframework/http/icallbackresponse.php
index 2f27a164897..87da73a5ad5 100644
--- a/lib/public/appframework/http/icallbackresponse.php
+++ b/lib/public/appframework/http/icallbackresponse.php
@@ -27,6 +27,7 @@ namespace OCP\AppFramework\Http;
* Interface ICallbackResponse
*
* @package OCP\AppFramework\Http
+ * @since 8.1.0
*/
interface ICallbackResponse {
@@ -34,6 +35,7 @@ interface ICallbackResponse {
* Outputs the content that should be printed
*
* @param IOutput $output a small wrapper that handles output
+ * @since 8.1.0
*/
function callback(IOutput $output);
diff --git a/lib/public/appframework/http/ioutput.php b/lib/public/appframework/http/ioutput.php
index 8fd362daf16..ad90dc1e4cb 100644
--- a/lib/public/appframework/http/ioutput.php
+++ b/lib/public/appframework/http/ioutput.php
@@ -24,11 +24,13 @@ namespace OCP\AppFramework\Http;
/**
* Very thin wrapper class to make output testable
+ * @since 8.1.0
*/
interface IOutput {
/**
* @param string $out
+ * @since 8.1.0
*/
public function setOutput($out);
@@ -36,21 +38,25 @@ interface IOutput {
* @param string $path
*
* @return bool false if an error occured
+ * @since 8.1.0
*/
public function setReadfile($path);
/**
* @param string $header
+ * @since 8.1.0
*/
public function setHeader($header);
/**
* @return int returns the current http response code
+ * @since 8.1.0
*/
public function getHttpResponseCode();
/**
* @param int $code sets the http status code
+ * @since 8.1.0
*/
public function setHttpResponseCode($code);
@@ -62,6 +68,7 @@ interface IOutput {
* @param string $domain
* @param bool $secure
* @param bool $httponly
+ * @since 8.1.0
*/
public function setCookie($name, $value, $expire, $path, $domain, $secure, $httponly);
diff --git a/lib/public/appframework/http/jsonresponse.php b/lib/public/appframework/http/jsonresponse.php
index 492811043f1..1a770109d45 100644
--- a/lib/public/appframework/http/jsonresponse.php
+++ b/lib/public/appframework/http/jsonresponse.php
@@ -33,6 +33,7 @@ use OCP\AppFramework\Http;
/**
* A renderer for JSON calls
+ * @since 6.0.0
*/
class JSONResponse extends Response {
@@ -47,6 +48,7 @@ class JSONResponse extends Response {
* constructor of JSONResponse
* @param array|object $data the object or array that should be transformed
* @param int $statusCode the Http status code, defaults to 200
+ * @since 6.0.0
*/
public function __construct($data=array(), $statusCode=Http::STATUS_OK) {
$this->data = $data;
@@ -58,6 +60,7 @@ class JSONResponse extends Response {
/**
* Returns the rendered json
* @return string the rendered json
+ * @since 6.0.0
*/
public function render(){
return json_encode($this->data);
@@ -68,6 +71,7 @@ class JSONResponse extends Response {
* @param array|object $data an array or object which will be transformed
* to JSON
* @return JSONResponse Reference to this object
+ * @since 6.0.0 - return value was added in 7.0.0
*/
public function setData($data){
$this->data = $data;
@@ -79,6 +83,7 @@ class JSONResponse extends Response {
/**
* Used to get the set parameters
* @return array the data
+ * @since 6.0.0
*/
public function getData(){
return $this->data;
diff --git a/lib/public/appframework/http/notfoundresponse.php b/lib/public/appframework/http/notfoundresponse.php
index 21f0461f5e6..8f59384faf1 100644
--- a/lib/public/appframework/http/notfoundresponse.php
+++ b/lib/public/appframework/http/notfoundresponse.php
@@ -26,15 +26,20 @@ use OCP\Template;
/**
* A generic 404 response showing an 404 error page as well to the end-user
+ * @since 8.1.0
*/
class NotFoundResponse extends Response {
+ /**
+ * @since 8.1.0
+ */
public function __construct() {
$this->setStatus(404);
}
/**
* @return string
+ * @since 8.1.0
*/
public function render() {
$template = new Template('core', '404', 'guest');
diff --git a/lib/public/appframework/http/ocsresponse.php b/lib/public/appframework/http/ocsresponse.php
index 4cc1ba80d03..c098e306656 100644
--- a/lib/public/appframework/http/ocsresponse.php
+++ b/lib/public/appframework/http/ocsresponse.php
@@ -33,6 +33,7 @@ use OC_OCS;
/**
* A renderer for OCS responses
+ * @since 8.1.0
*/
class OCSResponse extends Response {
@@ -58,6 +59,7 @@ class OCSResponse extends Response {
* @param int $dimension
* @param int|string $itemscount
* @param int|string $itemsperpage
+ * @since 8.1.0
*/
public function __construct($format, $status, $statuscode, $message,
$data=[], $tag='', $tagattribute='',
@@ -86,7 +88,10 @@ class OCSResponse extends Response {
}
}
-
+ /**
+ * @return string
+ * @since 8.1.0
+ */
public function render() {
return OC_OCS::generateXml(
$this->format, $this->status, $this->statuscode, $this->message,
@@ -96,4 +101,4 @@ class OCSResponse extends Response {
}
-} \ No newline at end of file
+}
diff --git a/lib/public/appframework/http/redirectresponse.php b/lib/public/appframework/http/redirectresponse.php
index a9108be8c04..41a2e48035e 100644
--- a/lib/public/appframework/http/redirectresponse.php
+++ b/lib/public/appframework/http/redirectresponse.php
@@ -31,6 +31,7 @@ use OCP\AppFramework\Http;
/**
* Redirects to a different URL
+ * @since 7.0.0
*/
class RedirectResponse extends Response {
@@ -39,6 +40,7 @@ class RedirectResponse extends Response {
/**
* Creates a response that redirects to a url
* @param string $redirectURL the url to redirect to
+ * @since 7.0.0
*/
public function __construct($redirectURL) {
$this->redirectURL = $redirectURL;
@@ -49,6 +51,7 @@ class RedirectResponse extends Response {
/**
* @return string the url to redirect
+ * @since 7.0.0
*/
public function getRedirectURL() {
return $this->redirectURL;
diff --git a/lib/public/appframework/http/response.php b/lib/public/appframework/http/response.php
index b79777c5f1d..8fd5fdd8f53 100644
--- a/lib/public/appframework/http/response.php
+++ b/lib/public/appframework/http/response.php
@@ -37,6 +37,7 @@ use OCP\AppFramework\Http;
* Base class for responses. Also used to just send headers.
*
* It handles headers, HTTP status code, last modified and ETag.
+ * @since 6.0.0
*/
class Response {
@@ -85,6 +86,7 @@ class Response {
* @param int $cacheSeconds the amount of seconds that should be cached
* if 0 then caching will be disabled
* @return $this
+ * @since 6.0.0 - return value was added in 7.0.0
*/
public function cacheFor($cacheSeconds) {
@@ -106,6 +108,7 @@ class Response {
* to null cookie will be considered as session
* cookie.
* @return $this
+ * @since 8.0.0
*/
public function addCookie($name, $value, \DateTime $expireDate = null) {
$this->cookies[$name] = array('value' => $value, 'expireDate' => $expireDate);
@@ -117,6 +120,7 @@ class Response {
* Set the specified cookies
* @param array $cookies array('foo' => array('value' => 'bar', 'expire' => null))
* @return $this
+ * @since 8.0.0
*/
public function setCookies(array $cookies) {
$this->cookies = $cookies;
@@ -128,6 +132,7 @@ class Response {
* Invalidates the specified cookie
* @param string $name
* @return $this
+ * @since 8.0.0
*/
public function invalidateCookie($name) {
$this->addCookie($name, 'expired', new \DateTime('1971-01-01 00:00'));
@@ -138,6 +143,7 @@ class Response {
* Invalidates the specified cookies
* @param array $cookieNames array('foo', 'bar')
* @return $this
+ * @since 8.0.0
*/
public function invalidateCookies(array $cookieNames) {
foreach($cookieNames as $cookieName) {
@@ -149,6 +155,7 @@ class Response {
/**
* Returns the cookies
* @return array
+ * @since 8.0.0
*/
public function getCookies() {
return $this->cookies;
@@ -160,6 +167,7 @@ class Response {
* @param string $name The name of the HTTP header
* @param string $value The value, null will delete it
* @return $this
+ * @since 6.0.0 - return value was added in 7.0.0
*/
public function addHeader($name, $value) {
$name = trim($name); // always remove leading and trailing whitespace
@@ -180,6 +188,7 @@ class Response {
* Set the headers
* @param array $headers value header pairs
* @return $this
+ * @since 8.0.0
*/
public function setHeaders(array $headers) {
$this->headers = $headers;
@@ -191,6 +200,7 @@ class Response {
/**
* Returns the set headers
* @return array the headers
+ * @since 6.0.0
*/
public function getHeaders() {
$mergeWith = [];
@@ -217,6 +227,7 @@ class Response {
/**
* By default renders no output
* @return null
+ * @since 6.0.0
*/
public function render() {
return null;
@@ -224,10 +235,11 @@ class Response {
/**
- * Set response status
- * @param int $status a HTTP status code, see also the STATUS constants
- * @return Response Reference to this object
- */
+ * Set response status
+ * @param int $status a HTTP status code, see also the STATUS constants
+ * @return Response Reference to this object
+ * @since 6.0.0 - return value was added in 7.0.0
+ */
public function setStatus($status) {
$this->status = $status;
@@ -238,6 +250,7 @@ class Response {
* Set a Content-Security-Policy
* @param ContentSecurityPolicy $csp Policy to set for the response object
* @return $this
+ * @since 8.1.0
*/
public function setContentSecurityPolicy(ContentSecurityPolicy $csp) {
$this->contentSecurityPolicy = $csp;
@@ -248,6 +261,7 @@ class Response {
* Get the currently used Content-Security-Policy
* @return ContentSecurityPolicy|null Used Content-Security-Policy or null if
* none specified.
+ * @since 8.1.0
*/
public function getContentSecurityPolicy() {
return $this->contentSecurityPolicy;
@@ -256,6 +270,7 @@ class Response {
/**
* Get response status
+ * @since 6.0.0
*/
public function getStatus() {
return $this->status;
@@ -265,6 +280,7 @@ class Response {
/**
* Get the ETag
* @return string the etag
+ * @since 6.0.0
*/
public function getETag() {
return $this->ETag;
@@ -274,6 +290,7 @@ class Response {
/**
* Get "last modified" date
* @return \DateTime RFC2822 formatted last modified date
+ * @since 6.0.0
*/
public function getLastModified() {
return $this->lastModified;
@@ -284,6 +301,7 @@ class Response {
* Set the ETag
* @param string $ETag
* @return Response Reference to this object
+ * @since 6.0.0 - return value was added in 7.0.0
*/
public function setETag($ETag) {
$this->ETag = $ETag;
@@ -296,6 +314,7 @@ class Response {
* Set "last modified" date
* @param \DateTime $lastModified
* @return Response Reference to this object
+ * @since 6.0.0 - return value was added in 7.0.0
*/
public function setLastModified($lastModified) {
$this->lastModified = $lastModified;
diff --git a/lib/public/appframework/http/streamresponse.php b/lib/public/appframework/http/streamresponse.php
index 057c395d84f..625b3d62278 100644
--- a/lib/public/appframework/http/streamresponse.php
+++ b/lib/public/appframework/http/streamresponse.php
@@ -28,6 +28,7 @@ use OCP\AppFramework\Http;
* Class StreamResponse
*
* @package OCP\AppFramework\Http
+ * @since 8.1.0
*/
class StreamResponse extends Response implements ICallbackResponse {
/** @var string */
@@ -35,6 +36,7 @@ class StreamResponse extends Response implements ICallbackResponse {
/**
* @param string $filePath the path to the file which should be streamed
+ * @since 8.1.0
*/
public function __construct ($filePath) {
$this->filePath = $filePath;
@@ -45,6 +47,7 @@ class StreamResponse extends Response implements ICallbackResponse {
* Streams the file using readfile
*
* @param IOutput $output a small wrapper that handles output
+ * @since 8.1.0
*/
public function callback (IOutput $output) {
// handle caching
diff --git a/lib/public/appframework/http/templateresponse.php b/lib/public/appframework/http/templateresponse.php
index 209b069c89a..961903a8eab 100644
--- a/lib/public/appframework/http/templateresponse.php
+++ b/lib/public/appframework/http/templateresponse.php
@@ -32,6 +32,7 @@ namespace OCP\AppFramework\Http;
/**
* Response for a normal template
+ * @since 6.0.0
*/
class TemplateResponse extends Response {
@@ -66,6 +67,7 @@ class TemplateResponse extends Response {
* @param array $params an array of parameters which should be passed to the
* template
* @param string $renderAs how the page should be rendered, defaults to user
+ * @since 6.0.0 - parameters $params and $renderAs were added in 7.0.0
*/
public function __construct($appName, $templateName, array $params=array(),
$renderAs='user') {
@@ -81,6 +83,7 @@ class TemplateResponse extends Response {
* @param array $params an array with key => value structure which sets template
* variables
* @return TemplateResponse Reference to this object
+ * @since 6.0.0 - return value was added in 7.0.0
*/
public function setParams(array $params){
$this->params = $params;
@@ -92,6 +95,7 @@ class TemplateResponse extends Response {
/**
* Used for accessing the set parameters
* @return array the params
+ * @since 6.0.0
*/
public function getParams(){
return $this->params;
@@ -101,6 +105,7 @@ class TemplateResponse extends Response {
/**
* Used for accessing the name of the set template
* @return string the name of the used template
+ * @since 6.0.0
*/
public function getTemplateName(){
return $this->templateName;
@@ -114,6 +119,7 @@ class TemplateResponse extends Response {
* normal page including footer and header and blank
* just renders the plain template
* @return TemplateResponse Reference to this object
+ * @since 6.0.0 - return value was added in 7.0.0
*/
public function renderAs($renderAs){
$this->renderAs = $renderAs;
@@ -125,6 +131,7 @@ class TemplateResponse extends Response {
/**
* Returns the set renderAs
* @return string the renderAs value
+ * @since 6.0.0
*/
public function getRenderAs(){
return $this->renderAs;
@@ -134,6 +141,7 @@ class TemplateResponse extends Response {
/**
* Returns the rendered html
* @return string the rendered html
+ * @since 6.0.0
*/
public function render(){
// \OCP\Template needs an empty string instead of 'blank' for an unwrapped response