34 parent::__construct( $queryModule, $moduleName,
'gc' );
44 $this->
getMain()->setCacheMode(
'public' );
55 foreach ( $gadgets as $category => $list ) {
56 if ( !$this->neededNames ||
isset( $this->neededNames[$category] ) ) {
58 if (
isset( $this->props[
'name'] ) ) {
59 $row[
'name'] = $category;
62 if ( $category !==
"" ) {
63 if (
isset( $this->props[
'title'] ) ) {
64 $row[
'desc'] = $this->
msg(
"gadget-section-$category" )->parse();
68 if (
isset( $this->props[
'members'] ) ) {
69 $row[
'members'] = count( $list );
76 $result->setIndexedTagName(
$data,
'category' );
104 'action=query&list=gadgetcategories'
105 =>
'apihelp-query+gadgetcategories-example-1',
106 'action=query&list=gadgetcategories&gcnames=foo|bar&gcprop=name|title|members'
107 =>
'apihelp-query+gadgetcategories-example-2',
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
getMain()
Get the main module.
const PARAM_TYPE
(string|string[]) Either an array of allowed value strings, or a string type as described below.
const PARAM_DFLT
(null|boolean|integer|string) Default value of the parameter.
getResult()
Get the result object.
extractRequestParams( $options=[])
Using getAllowedParams(), this function makes an array of the values provided by the user,...
getModuleName()
Get the name of the module being executed by this instance.
const PARAM_ISMULTI
(boolean) Accept multiple pipe-separated values for this parameter (e.g.
This is a base class for all Query modules.
Created on 16 April 2011 API for Gadgets extension.
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
__construct(ApiQuery $queryModule, $moduleName)
This is the main query class.
msg( $key)
Get a Message object with context set Parameters are the same as wfMessage()
static singleton()
Get the configured default GadgetRepo.
$data
Utility to generate mapping file used in mw.Title (phpCharToUpper.json)
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))