diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-11-25 17:15:08 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-11-25 17:15:08 +0100 |
commit | 1fdd2ac7eed9cfd0322e6f17957a083310311470 (patch) | |
tree | c3074a2d80607b981bdfa91e2b506f71b8e4a27c | |
parent | 993fea2f05ae300fd1036d2a82ba02413f2649d4 (diff) | |
download | nextcloud-server-1fdd2ac7eed9cfd0322e6f17957a083310311470.tar.gz nextcloud-server-1fdd2ac7eed9cfd0322e6f17957a083310311470.zip |
adding documentation for registerRoutes()
-rw-r--r-- | lib/public/appframework/app.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/public/appframework/app.php b/lib/public/appframework/app.php index 1f82f8da889..1021a21397f 100644 --- a/lib/public/appframework/app.php +++ b/lib/public/appframework/app.php @@ -49,7 +49,19 @@ class App { } /** - * This function is to be called + * This function is to be called to create single routes and restful routes based on the given $routes array. + * + * Example code in routes.php of tasks app (it will register two restful resources): + * $routes = array( + * 'resources' => array( + * 'lists' => array('url' => '/tasklists'), + * 'tasks' => array('url' => '/tasklists/{listId}/tasks') + * ) + * ); + * + * $a = new TasksApp(); + * $a->registerRoutes($this, $routes); + * * @param \OC_Router $router * @param array $routes */ |