From: Ryan Kaldari Date: Wed, 19 Oct 2011 00:53:39 +0000 (+0000) Subject: more accurate documentation for addValue() method X-Git-Tag: 1.31.0-rc.0~27017 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=bc02b15e0ca0536e09442aa55c55553f049e2dde;p=lhc%2Fweb%2Fwiklou.git more accurate documentation for addValue() method --- diff --git a/includes/api/ApiResult.php b/includes/api/ApiResult.php index b644354f72..3b912fd790 100644 --- a/includes/api/ApiResult.php +++ b/includes/api/ApiResult.php @@ -246,11 +246,12 @@ class ApiResult extends ApiBase { /** * Add value to the output data at the given path. - * Path is an indexed array, each element specifying the branch at which to add the new value - * Setting $path to array('a','b','c') is equivalent to data['a']['b']['c'] = $value - * If $name is empty, the $value is added as a next list element data[] = $value + * Path can be an indexed array, each element specifying the branch at which to add the new + * value. Setting $path to array('a','b','c') is equivalent to data['a']['b']['c'] = $value. + * If $path is null, the value will be inserted at the data root. + * If $name is empty, the $value is added as a next list element data[] = $value. * - * @param $path + * @param $path array|string|null * @param $name string * @param $value mixed * @param $overwrite bool