if ( $permissionErrors ) {
$this->dieUsageMsg( $permissionErrors[0] );
}
-
-
}
/**
}
/**
- * @param $obj ApiBase
+ * @param $obj ApiBase
* @return ApiResult
*/
function getClassInfo( $obj ) {
* Update a cache mode string, applying the cache mode of a new module to it.
* The cache mode may increase in the level of privacy, but public modules
* added to private data do not decrease the level of privacy.
+ *
+ * @return string
*/
protected function mergeCacheMode( $cacheMode, $modCacheMode ) {
if ( $modCacheMode === 'anon-public-user-private' ) {
*
* Public caching will only be allowed if *all* the modules that supply
* data for a given request return a cache mode of public.
+ *
+ * @return string
*/
public function getCacheMode( $params ) {
return 'private';
}
}
+ /**
+ * @return array
+ */
public function getPossibleErrors() {
return array_merge( parent::getPossibleErrors(), array(
array( 'invalidtitle', 'title' ),
* 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
+ *
+ * @param $path
+ * @param $name string
+ * @param $value mixed
+ * @param $overwrite bool
+ *
* @return bool True if $value fits in the result, false if not
*/
public function addValue( $path, $name, $value, $overwrite = false ) {
/**
* Callback function for cleanUpUTF8()
+ *
+ * @param $s string
*/
private static function cleanUp_helper( &$s ) {
if ( !is_string( $s ) ) {