27 parent::__construct(
$query, $moduleName,
'rf' );
39 $config = ConfigFactory::getDefaultInstance()->makeConfig(
'cite' );
40 if ( !$config->get(
'CiteStoreReferencesData' ) ) {
41 if ( is_callable( [ $this,
'dieWithError' ] ) ) {
44 $this->
dieUsage(
'Cite extension reference storage is not enabled',
'citestoragedisabled' );
50 if ( !is_null(
$params[
'continue'] ) ) {
51 $startId = (int)
$params[
'continue'];
58 foreach (
$titles as $pageId => $title ) {
60 if ( $startId !==
false && $startId !== $pageId ) {
68 if ( $storedRefs !==
false ) {
70 foreach ( $storedRefs[
'refs'] as $index => $grouping ) {
71 foreach ( $grouping as $group => $members ) {
72 foreach ( $members as $name => $ref ) {
75 if ( is_string( $name ) ) {
80 $ref[
'group'] = $group;
81 $ref[
'reflist'] = $index;
82 $allReferences[$id] = $ref;
107 'action=query&prop=references&titles=Albert%20Einstein' =>
108 'apihelp-query+references-example-1',
dieWithError( $msg, $code=null, $data=null, $httpCode=null)
Abort execution with an error.
dieContinueUsageIf( $condition)
Die with the 'badcontinue' error.
extractRequestParams( $parseLimit=true)
Using getAllowedParams(), this function makes an array of the values provided by the user,...
const PARAM_HELP_MSG
(string|array|Message) Specify an alternative i18n documentation message for this parameter.
dieUsage( $description, $errorCode, $httpRespCode=0, $extradata=null)
Throw an ApiUsageException, which will (if uncaught) call the main module's error handler and die wit...
This is a base class for all Query modules.
setContinueEnumParameter( $paramName, $paramValue)
Set a query-continue value.
addPageSubItems( $pageId, $data)
Add a sub-element under the page element with the given page ID.
getPageSet()
Get the PageSet object to work on.
__construct( $query, $moduleName)
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
getCacheMode( $params)
Get the cache mode for the data generated by this module.
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
static setArrayType(array &$arr, $type, $kvpKeyName=null)
Set the array data type.
static getStoredReferences(Title $title)
Fetch references stored for the given title in page_props For performance, results are cached.
static getReferencesKey( $key)
Return an id for use in wikitext output based on a key and optionally the number of it,...
Allows to change the fields on the form that will be generated $name
null for the local wiki Added should default to null in handler for backwards compatibility add a value to it if you want to add a cookie that have to vary cache options can modify $query
linkcache txt The LinkCache class maintains a list of article titles and the information about whether or not the article exists in the database This is used to mark up links when displaying a page If the same link appears more than once on any page then it only has to be looked up once In most cases link lookups are done in batches with the LinkBatch class or the equivalent in so the link cache is mostly useful for short snippets of parsed and for links in the navigation areas of the skin The link cache was formerly used to track links used in a document for the purposes of updating the link tables This application is now deprecated To create a you can use the following $titles