[Pkg-owncloud-commits] [owncloud] 124/239: adding documentation for registerRoutes()
David Prévot
taffit at moszumanska.debian.org
Fri Nov 29 01:32:28 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 1fdd2ac7eed9cfd0322e6f17957a083310311470
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date: Mon Nov 25 17:15:08 2013 +0100
adding documentation for registerRoutes()
---
lib/public/appframework/app.php | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/lib/public/appframework/app.php b/lib/public/appframework/app.php
index 1f82f8d..1021a21 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
*/
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list