aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/json.php
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-05-06 22:02:16 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-05-06 22:02:16 +0200
commit5d55c709dddad44984446efa49ceb7084fc16b3f (patch)
treefd7d0a280ab436eb40d89a3acc9e00ee8ed284f4 /lib/public/json.php
parent2edf59c026ef7c59551072ab5bfcdac576e3d65b (diff)
downloadnextcloud-server-5d55c709dddad44984446efa49ceb7084fc16b3f.tar.gz
nextcloud-server-5d55c709dddad44984446efa49ceb7084fc16b3f.zip
some more documentation cleanups. much more is needed.
And greeting from the Atlanta airport. ;-)
Diffstat (limited to 'lib/public/json.php')
-rw-r--r--lib/public/json.php45
1 files changed, 25 insertions, 20 deletions
diff --git a/lib/public/json.php b/lib/public/json.php
index 36d3bed807f..7fc6a0b01d4 100644
--- a/lib/public/json.php
+++ b/lib/public/json.php
@@ -33,57 +33,62 @@ namespace OCP;
class JSON {
-
/**
- * Encode and print $data in JSON format
+ * @brief Encode and print $data in JSON format
+ * @param array $data The data to use
+ * @param string $setContentType the optional content type
*/
- public static function encodedPrint($data,$setContentType=true){
- return(\OC_JSON::encodedPrint($data,$setContentType));
+ public static function encodedPrint( $data, $setContentType=true ){
+ return(\OC_JSON::encodedPrint( $data, $setContentType ));
}
+
/**
- * Check if the user is logged in, send json error msg if not
+ * @brief Check if the user is logged in, send json error msg if not
*/
public static function checkLoggedIn(){
return(\OC_JSON::checkLoggedIn());
}
-
/**
- * Send json success msg
+ * @brief Send json success msg
+ * @param array $data The data to use
*/
- public static function success($data = array()){
- return(\OC_JSON::success($data));
+ public static function success( $data = array() ){
+ return(\OC_JSON::success( $data ));
}
/**
- * Send json error msg
+ * @brief Send json error msg
+ * @param array $data The data to use
*/
- public static function error($data = array()){
- return(\OC_JSON::error($data));
+ public static function error( $data = array() ){
+ return(\OC_JSON::error( $data ));
}
/**
- * set Content-Type header to jsonrequest
+ * @brief set Content-Type header to jsonrequest
+ * @param array $type The contwnt type header
*/
- public static function setContentTypeHeader($type='application/json'){
- return(\OC_JSON::setContentTypeHeader($type));
+ public static function setContentTypeHeader( $type='application/json' ){
+ return(\OC_JSON::setContentTypeHeader( $type ));
}
/**
- * Check if the app is enabled, send json error msg if not
- */
- public static function checkAppEnabled($app){
- return(\OC_JSON::checkAppEnabled($app));
+ * @brief Check if the App is enabled and send JSON error message instead
+ * @param string $app The app to check
+ */
+ public static function checkAppEnabled( $app ){
+ return(\OC_JSON::checkAppEnabled( $app ));
}
/**
- * Check if the user is a admin, send json error msg if not
+ * @brief Check if the user is a admin, send json error msg if not
*/
public static function checkAdminUser(){
return(\OC_JSON::checkAdminUser());