aboutsummaryrefslogtreecommitdiff
path: root/engine/handlers/service_handler.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-09-15 20:23:57 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-09-15 20:23:57 +0000
commite501124c1449ec95d2e743bf116b361608b8b574 (patch)
treeacebe76e4cd9851d30379bfe87191943531aa510 /engine/handlers/service_handler.php
parentf809e76743a6ccab2badf69633bb6132c1358f2e (diff)
downloadelgg-e501124c1449ec95d2e743bf116b361608b8b574.tar.gz
elgg-e501124c1449ec95d2e743bf116b361608b8b574.tar.bz2
Refs #2450: Documented handler files.
git-svn-id: http://code.elgg.org/elgg/trunk@6942 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/handlers/service_handler.php')
-rw-r--r--engine/handlers/service_handler.php24
1 files changed, 16 insertions, 8 deletions
diff --git a/engine/handlers/service_handler.php b/engine/handlers/service_handler.php
index 4cc54a987..c6a7e57c5 100644
--- a/engine/handlers/service_handler.php
+++ b/engine/handlers/service_handler.php
@@ -1,18 +1,26 @@
<?php
/**
- * Elgg web services handler.
+ * Services handler.
*
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
+ * This file dispatches requests to web services. It is called via a URL rewrite
+ * in .htaccess from http://site/services/api/handler/response_format/request.
+ * The first element after 'services/api/' is the service handler name as
+ * registered by {@link register_service_handler()}.
+ *
+ * The remaining string is then passed to the {@link service_handler()}
+ * which explodes by /, extracts the first element as the response format
+ * (viewtype), and then passes the remaining array to the service handler
+ * function registered by {@link register_service_handler()}.
+ *
+ * If a service handler isn't found, a 404 header is sent.
+ *
+ * @package Elgg.Core
+ * @subpackage WebServices
+ * @link http://docs.elgg.org/Tutorials/WebServices
*/
-
-// Load Elgg engine
require_once("../start.php");
-// Get input
$handler = get_input('handler');
$request = get_input('request');