summaryrefslogtreecommitdiffstats
path: root/lib/public/irequest.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-04-16 17:00:08 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-04-16 17:00:08 +0200
commit7644950b48b094bfe5675348aefb7cf5747d325b (patch)
treea1792e21239a86f471da99b454134a5d8533ef77 /lib/public/irequest.php
parent8653da6c16597959c7bd0f0b202747ff96204575 (diff)
downloadnextcloud-server-7644950b48b094bfe5675348aefb7cf5747d325b.tar.gz
nextcloud-server-7644950b48b094bfe5675348aefb7cf5747d325b.zip
Add @since tags to all methods in public namespace
* enhance the app development experience - you can look up the method introduction right inside the code without searching via git blame * easier to write apps for multiple versions
Diffstat (limited to 'lib/public/irequest.php')
-rw-r--r--lib/public/irequest.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/public/irequest.php b/lib/public/irequest.php
index 1b83eaf2c36..a236c5df9a0 100644
--- a/lib/public/irequest.php
+++ b/lib/public/irequest.php
@@ -58,6 +58,7 @@ namespace OCP;
*
* @property-read string[] $server
* @property-read string[] $urlParams
+ * @since 6.0.0
*/
interface IRequest {
@@ -65,6 +66,7 @@ interface IRequest {
* @param string $name
*
* @return string
+ * @since 6.0.0
*/
function getHeader($name);
@@ -80,6 +82,7 @@ interface IRequest {
* 3. GET parameters
* @param mixed $default If the key is not found, this value will be returned
* @return mixed the content of the array
+ * @since 6.0.0
*/
public function getParam($key, $default = null);
@@ -89,6 +92,7 @@ interface IRequest {
*
* (as GET or POST) or through the URL by the route
* @return array the array with all parameters
+ * @since 6.0.0
*/
public function getParams();
@@ -96,6 +100,7 @@ interface IRequest {
* Returns the method of the request
*
* @return string the method of the request (POST, GET, etc)
+ * @since 6.0.0
*/
public function getMethod();
@@ -104,6 +109,7 @@ interface IRequest {
*
* @param string $key the key that will be taken from the $_FILES array
* @return array the file in the $_FILES element
+ * @since 6.0.0
*/
public function getUploadedFile($key);
@@ -113,6 +119,7 @@ interface IRequest {
*
* @param string $key the key that will be taken from the $_ENV array
* @return array the value in the $_ENV element
+ * @since 6.0.0
*/
public function getEnv($key);
@@ -122,6 +129,7 @@ interface IRequest {
*
* @param string $key the key that will be taken from the $_COOKIE array
* @return array the value in the $_COOKIE element
+ * @since 6.0.0
*/
function getCookie($key);
@@ -129,6 +137,7 @@ interface IRequest {
/**
* Checks if the CSRF check was correct
* @return bool true if CSRF check passed
+ * @since 6.0.0
*/
public function passesCSRFCheck();
@@ -136,6 +145,7 @@ interface IRequest {
* Returns an ID for the request, value is not guaranteed to be unique and is mostly meant for logging
* If `mod_unique_id` is installed this value will be taken.
* @return string
+ * @since 8.1.0
*/
public function getId();
@@ -145,6 +155,7 @@ interface IRequest {
* specified in this header will be returned instead.
* Do always use this instead of $_SERVER['REMOTE_ADDR']
* @return string IP address
+ * @since 8.1.0
*/
public function getRemoteAddress();
@@ -152,6 +163,7 @@ interface IRequest {
* Returns the server protocol. It respects reverse proxy servers and load
* balancers.
* @return string Server protocol (http or https)
+ * @since 8.1.0
*/
public function getServerProtocol();
@@ -159,6 +171,7 @@ interface IRequest {
* Returns the request uri, even if the website uses one or more
* reverse proxies
* @return string
+ * @since 8.1.0
*/
public function getRequestUri();
@@ -166,6 +179,7 @@ interface IRequest {
* Get raw PathInfo from request (not urldecoded)
* @throws \Exception
* @return string Path info
+ * @since 8.1.0
*/
public function getRawPathInfo();
@@ -173,6 +187,7 @@ interface IRequest {
* Get PathInfo from request
* @throws \Exception
* @return string|false Path info or false when not found
+ * @since 8.1.0
*/
public function getPathInfo();
@@ -180,6 +195,7 @@ interface IRequest {
* Returns the script name, even if the website uses one or more
* reverse proxies
* @return string the script name
+ * @since 8.1.0
*/
public function getScriptName();
@@ -187,6 +203,7 @@ interface IRequest {
* Checks whether the user agent matches a given regex
* @param array $agent array of agent names
* @return bool true if at least one of the given agent matches, false otherwise
+ * @since 8.1.0
*/
public function isUserAgent(array $agent);
@@ -194,6 +211,7 @@ interface IRequest {
* Returns the unverified server host from the headers without checking
* whether it is a trusted domain
* @return string Server host
+ * @since 8.1.0
*/
public function getInsecureServerHost();
@@ -201,6 +219,7 @@ interface IRequest {
* Returns the server host from the headers, or the first configured
* trusted domain if the host isn't in the trusted list
* @return string Server host
+ * @since 8.1.0
*/
public function getServerHost();
}