summaryrefslogtreecommitdiffstats
path: root/lib/public/route
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/route
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/route')
-rw-r--r--lib/public/route/iroute.php16
-rw-r--r--lib/public/route/irouter.php15
2 files changed, 31 insertions, 0 deletions
diff --git a/lib/public/route/iroute.php b/lib/public/route/iroute.php
index ec770e9845d..4c9b4ca9b47 100644
--- a/lib/public/route/iroute.php
+++ b/lib/public/route/iroute.php
@@ -23,10 +23,17 @@
*/
namespace OCP\Route;
+/**
+ * Interface IRoute
+ *
+ * @package OCP\Route
+ * @since 7.0.0
+ */
interface IRoute {
/**
* Specify PATCH as the method to use with this route
* @return \OCP\Route\IRoute
+ * @since 7.0.0
*/
public function patch();
@@ -35,6 +42,7 @@ interface IRoute {
*
* @param string $method HTTP method (uppercase)
* @return \OCP\Route\IRoute
+ * @since 7.0.0
*/
public function method($method);
@@ -44,24 +52,28 @@ interface IRoute {
*
* @param string $file
* @return void
+ * @since 7.0.0
*/
public function actionInclude($file);
/**
* Specify GET as the method to use with this route
* @return \OCP\Route\IRoute
+ * @since 7.0.0
*/
public function get();
/**
* Specify POST as the method to use with this route
* @return \OCP\Route\IRoute
+ * @since 7.0.0
*/
public function post();
/**
* Specify DELETE as the method to use with this route
* @return \OCP\Route\IRoute
+ * @since 7.0.0
*/
public function delete();
@@ -74,6 +86,7 @@ interface IRoute {
*
* This function is called with $class set to a callable or
* to the class with $function
+ * @since 7.0.0
*/
public function action($class, $function = null);
@@ -82,6 +95,7 @@ interface IRoute {
*
* @param array $defaults The defaults
* @return \OCP\Route\IRoute
+ * @since 7.0.0
*/
public function defaults($defaults);
@@ -90,12 +104,14 @@ interface IRoute {
*
* @param array $requirements The requirements
* @return \OCP\Route\IRoute
+ * @since 7.0.0
*/
public function requirements($requirements);
/**
* Specify PUT as the method to use with this route
* @return \OCP\Route\IRoute
+ * @since 7.0.0
*/
public function put();
}
diff --git a/lib/public/route/irouter.php b/lib/public/route/irouter.php
index fbbcdcbb1af..3f5b58ac416 100644
--- a/lib/public/route/irouter.php
+++ b/lib/public/route/irouter.php
@@ -24,23 +24,32 @@
namespace OCP\Route;
+/**
+ * Interface IRouter
+ *
+ * @package OCP\Route
+ * @since 7.0.0
+ */
interface IRouter {
/**
* Get the files to load the routes from
*
* @return string[]
+ * @since 7.0.0
*/
public function getRoutingFiles();
/**
* @return string
+ * @since 7.0.0
*/
public function getCacheKey();
/**
* loads the api routes
* @return void
+ * @since 7.0.0
*/
public function loadRoutes($app = null);
@@ -49,6 +58,7 @@ interface IRouter {
*
* @param string $name Name of the collection to use.
* @return void
+ * @since 7.0.0
*/
public function useCollection($name);
@@ -56,6 +66,7 @@ interface IRouter {
* returns the current collection name in use for adding routes
*
* @return string the collection name
+ * @since 8.0.0
*/
public function getCurrentCollection();
@@ -67,6 +78,7 @@ interface IRouter {
* @param array $defaults An array of default parameter values
* @param array $requirements An array of requirements for parameters (regexes)
* @return \OCP\Route\IRoute
+ * @since 7.0.0
*/
public function create($name, $pattern, array $defaults = array(), array $requirements = array());
@@ -76,12 +88,14 @@ interface IRouter {
* @param string $url The url to find
* @throws \Exception
* @return void
+ * @since 7.0.0
*/
public function match($url);
/**
* Get the url generator
*
+ * @since 7.0.0
*/
public function getGenerator();
@@ -92,6 +106,7 @@ interface IRouter {
* @param array $parameters Parameters for the route
* @param bool $absolute
* @return string
+ * @since 7.0.0
*/
public function generate($name, $parameters = array(), $absolute = false);