Assembly line feeders

From Apibot
Jump to: navigation, search

For an assembly line to work, someone has to load on it whatever is to be processed. In the Apibot Assembly line interface this is done by objects from a specific group, called feeders.

A feeder supplies a stream of signals (feed), carrying data blocks (typically one data block per signal). Every stream starts with a "Start" signal that carries no data block. Follow the data signals. After all data is supplied, an "End" signal (that also carries no data block) is sent.

A feeder supplies data of the same kind - page revisions, or directory entries, etc. The data blocks in a stream typically belong to the same group - revisions of the same page, entries of the same directory etc. Most feeders support parameters that specify what data is to be supplied (eg. the title of the page with the revisions, etc).

Supplying a feed

A feeder will supply a feed either when its function feed() is called, or when it is sent a specific type of signal - typically, a data signal. (For example, if you string a feeder to another feeder, the second one will send an entire feed at every data packet received from the first feeder.) Signals that cause the feeder to send a feed are stopped at it, the other signals are simply passed further.

Properties and methods

In addition to the properties and methods of all assembly line objects, all feeders have the following:

Common

Public properties

  • $signal_params: should be an array of parameters. Will be sent with every signal as default signal parameters. NOT to be confused with the parameters that govern the work of the feeder itself.
  • $feed_on_signal: what signal should force the feeder to send a feed. Takes one of the predefined constants FEED_ON_SIGNAL_NONE, FEED_ON_SIGNAL_START, FEED_ON_SIGNAL_DATA (default) and FEED_ON_SIGNAL_END.
  • $subfeeder_mode: if set to true (default is false), the feeder will not send feed start and end signals - only data signals. This can be used to set it as a "slave" to another feeder, when it is needed to send a feed for every element or group of elements from the master feeder, but to have all slave data elements sent in a single feed. (The slave feeder will replace the data signals from the master feeder with its own, but will let through the master feed start and end signals, thus forming a complete feed.)

Public methods

  • feed ( $callback = NULL, $signal_params = NULL ): sends a feed. Adds $callback (if not NULL) to the feeder downstream callbacks. Makes $signal_params (if not NULL) the default signal params.

Feeder-specific

Feeders also support parameters that are specific for each feeder or group of feeders. For more info, see the feeders and feeder groups descriptions.

Feeders list

All feeders files are situated in subdirectories of the directory interfaces/line/feeders.

Query feeders

These are based on MediaWiki API queries, implemented through API_Query objects.

Will make use of the parameters supported by the appropriate API query in the wiki the bot is connected to. Assign the value you need to a feeder object property with the same name (minus the prefix). For example, if you want to have an allpages list feeder, and to set its from parameter to "Albert Einstein", you need something like this:

$feeder = new Feeder_Query_List_Allpages ( $core );
$feeder->from = "Albert Einstein";  // not $feeder->apfrom!

For verbose and actual descriptions of the different MediaWiki API queries, and for a full list of the parameters supported by each one, see the MediaWiki documentation.

You can check what parameter names and values are supported at this specific wiki through the following two public functions in the feeder class:

  • is_paramname_ok ( $name )
  • is_paramavalue_ok ( $name, $value )

Query feeders are able to auto-determine parameters from the signal (other than what is set in the 'feeder' paramgroup and in the paramgroup named for the feeder class), as follows:

  • Feeder_Query_Property_*, Feeder_Query_List_Backlinks, Feeder_Query_List_Embeddedin, Feeder_Query_Generator_Backlinks, Feeder_Query_Generator_Embeddedin: page title or pageid (controlled by a public property $set_page_from_signal_data, default: true)
  • Feeder_Query_List_Categorymembers, Feeder_Query_Generator_Categorymembers: category title or pageid (controlled by a public property $set_category_from_signal_data, default: true)
  • Feeder_Query_List_Imageusage, Feeder_Query_Generator_Imageusage: title (controlled by a public property $set_image_from_signal_data, default: true)
  • Feeder_Query_List_Usercontribs, Feeder_Query_Generator_Usercontribs: user (controlled by a public property $set_user_from_signal_data, default: true)
  • Feeder_Query_List_Extlink, Feeder_Query_Generator_Extlink: the URL (controlled by a public property $set_extlink_from_signal_data, default: true)
  • Feeder_Query_List_Alllinks, Feeder_Query_Generator_Allinks, Feeder_Query_List_Allpages, Feeder_Query_Generator_Allpages, Feeder_Query_List_Alltransclusions, Feeder_Query_Generator_Alltransclusions: namespace Id (controlled by a public property $set_nsid_from_signal_data, default: true)

List feeders

Class name Defined in file Objects it feeds
Feeder_Query_List_Allcategories query/list/allcategories.php Categories in this wiki
Feeder_Query_List_Allimages query/list/allimages.php Images in this wiki
Feeder_Query_List_Alllinks query/list/alllinks.php Unique links to pages in a namespace
Feeder_Query_List_Allpages query/list/allpages.php Pages in a namespace
Feeder_Query_List_Alltransclusions (v0.40.6+) query/list/alltransclusions.php Transcluded pages in a namespace
Feeder_Query_List_Allusers query/list/allusers.php Users in this wiki
Feeder_Query_List_Backlinks query/list/backlinks.php Pages that link to a specified page
Feeder_Query_List_Blocks query/list/blocks.php User / IP blocks in this wiki
Feeder_Query_List_Categorymembers query/list/categorymembers.php Members of a specified category
Feeder_Query_List_Deletedrevs query/list/deletedrevs.php Deleted revisions that match a set of criteria
Feeder_Query_List_Embeddedin query/list/embeddedin.php Pages that transclude a specified page
Feeder_Query_List_Exturlusage query/list/exturlusage.php Pages that include a specific URL
Feeder_Query_List_Filearchive query/list/filearchive.php Deleted files in this wiki
Feeder_Query_List_Imageusage query/list/imageusage.php Pages that use a specified image
Feeder_Query_List_Iwbacklinks query/list/iwbacklinks.php Pages that link to a specified interwiki
Feeder_Query_List_Langbacklinks query/list/langbacklinks.php Pages that link to a given language link
Feeder_Query_List_Logevents query/list/logevents.php Log entries in this wiki
Feeder_Query_List_Protectedtitles query/list/protectedtitles.php Titles protected from creation
Feeder_Query_List_Querypage query/list/querypage.php Entries listed by specified special page
Feeder_Query_List_Random query/list/random.php A random list of pages
Feeder_Query_List_Recentchanges query/list/recentchanges.php Recent changes on this wiki
Feeder_Query_List_Search query/list/search.php Pages that contain a specified string
Feeder_Query_List_Tags query/list/tags.php Change tags valid in this wiki
Feeder_Query_List_Usercontribs query/list/usercontribs.php Contributions by a specified user
Feeder_Query_List_Users query/list/users.php Verbose info about specified users
Feeder_Query_List_Watchlist query/list/watchlist.php Pages in the bot account's watchlist
Feeder_Query_List_Watchlistraw query/list/watchlistraw.php Pages in all logged users watchlists
Feeder_Query_List_ByName query/list/by_name.php Pages in all logged users watchlists

The Feeder_Query_List_ByName is a special one. Its creation requires not one, but two parameters. The second parameter is the API name of the list query submodule you would like to engage. With it, you can access types of query list info that aren't obtained by the currently available feeders. In addition, you may also specify a third parameter - the type of the data elements for this feeder.

Querypage list feeders

Convenience extensions of the Feeder_Query_List_Querypage feeder that pre-specify the special page that will be queried. (For special pages supported by newer versions of the MediaWiki API or some extensions, but not listed here, you can use the vanilla Feeder_Query_List_Querypage feeder.)

Class name Defined in file Objects it feeds
Feeder_Query_List_Querypage_Ancientpages query/list/querypage_ancientpages.php Pages that haven't been updated for a long time
Feeder_Query_List_Querypage_Brokenredirects query/list/querypage_brokenredirects.php Redirects that do not point to an existing page
Feeder_Query_List_Querypage_Deadendpages query/list/querypage_deadendpages.php Pages that contain no wikilinks
Feeder_Query_List_Querypage_Disambiguations query/list/querypage_disambiguations.php Disambiguation pages
Feeder_Query_List_Querypage_Doubleredirects query/list/querypage_doubleredirects.php Redirects that point to redirects
Feeder_Query_List_Querypage_Fewestrevisions query/list/querypage_fewestrevisions.php Pages with fewest revisions
Feeder_Query_List_Querypage_Listredirects query/list/querypage_listredirects.php Redirects
Feeder_Query_List_Querypage_Lonelypages query/list/querypage_lonelypages.php Pages that aren't wikilinked to by other pages
Feeder_Query_List_Querypage_Longpages query/list/querypage_longpages.php Pages with longest texts
Feeder_Query_List_Querypage_Mostcategories query/list/querypage_mostcategories.php Pages that belong to greatest number of categorties
Feeder_Query_List_Querypage_Mostimages query/list/querypage_mostimages.php Pages with greatest number of images
Feeder_Query_List_Querypage_Mostlinked query/list/querypage_mostlinked.php Pages that are wikilinked to by most pages
Feeder_Query_List_Querypage_Mostlinkedcategories query/list/querypage_mostlinkedcategories.php Pages that are wikilinked to by most pages
Feeder_Query_List_Querypage_Mostlinkedtemplates query/list/querypage_mostlinkedtemplates.php Templates that are wikilinked to by most pages
Feeder_Query_List_Querypage_Mostrevisions query/list/querypage_mostrevisions.php Pages with greatest number of revisions
Feeder_Query_List_Querypage_Shortpages query/list/querypage_shortpages.php Pages with shortest texts
Feeder_Query_List_Querypage_Uncategorizedcategories query/list/querypage_uncategorizedcategories.php Categories that do not belong to any category
Feeder_Query_List_Querypage_Uncategorizedimages query/list/querypage_uncategorizedimages.php Images that do not belong to any category
Feeder_Query_List_Querypage_Uncategorizedtemplates query/list/querypage_uncategorizedtemplates.php Templates that do not belong to any category
Feeder_Query_List_Querypage_Unusedcategories query/list/querypage_unusedcategories.php Empty categories
Feeder_Query_List_Querypage_Unusedimages query/list/querypage_unusedimages.php Images that are not used in any page
Feeder_Query_List_Querypage_Unusedtemplates query/list/querypage_unusedtemplates.php Templates that are not included in any page
Feeder_Query_List_Querypage_Unwatchedpages query/list/querypage_unwatchedpages.php Pages that do not belong to any watchlist
Feeder_Query_List_Querypage_Wantedcategories query/list/querypage_wantedcategories.php Categories that do not exist but are referred to
Feeder_Query_List_Querypage_Wantedfiles query/list/querypage_wantedfiles.php Files that do not exist but are referred to
Feeder_Query_List_Querypage_Wantedpages query/list/querypage_wantedpages.php Pages that do not exist but are referred to
Feeder_Query_List_Querypage_Wantedtemplates query/list/querypage_wantedtemplates.php Templates that do not exist but are referred to
Feeder_Query_List_Querypage_Withoutinterwiki query/list/querypage_withoutinterwiki.php Pages that do not have interwikis

Generator feeders

They work much like the corresponding list feeders, but with an important difference. You can also set to them, as object properties, the page properties that must be requested for the page objects obtained by the feeder. For example, if you want to request also some properties and the categoryinfo for all categories listed, you can use something like this:

$feeder = new Feeder_Query_Generator_Allcategories ( $core );
$feeder->info = array ( 'prop' => "pageid|ns|title|protection|talkid|subjectid", 'intoken' => "edit" );
$feeder->categoryinfo = ""; // no subparams to request, just the categoryinfo itself

Supported are all page properties supported by the wiki the bot is connected to.

Class name Defined in file Objects it feeds
Feeder_Query_Generator_Allcategories query/generator/allcategories.php Categories in this wiki
Feeder_Query_Generator_Allimages query/generator/allimages.php Images in this wiki
Feeder_Query_Generator_Alllinks query/generator/alllinks.php Unique links to pages in a namespace
Feeder_Query_Generator_Allpages query/generator/allpages.php Pages in a namespace
Feeder_Query_Generator_Alltransclusions (v0.40.6+) query/generator/alltransclusions.php Transcluded pages in a namespace
Feeder_Query_Generator_Allusers query/generator/allusers.php Users in this wiki
Feeder_Query_Generator_Backlinks query/generator/backlinks.php Pages that link to a specified page
Feeder_Query_Generator_Blocks query/generator/blocks.php User / IP blocks in this wiki
Feeder_Query_Generator_Categorymembers query/generator/categorymembers.php Members of a specified category
Feeder_Query_Generator_Deletedrevs query/generator/deletedrevs.php Deleted revisions that match a set of criteria
Feeder_Query_Generator_Embeddedin query/generator/embeddedin.php Pages that transclude a specified page
Feeder_Query_Generator_Exturlusage query/generator/exturlusage.php Pages that include a specific URL
Feeder_Query_Generator_Filearchive query/generator/filearchive.php Deleted files in this wiki
Feeder_Query_Generator_Imageusage query/generator/imageusage.php Pages that use a specified image
Feeder_Query_Generator_Iwbacklinks query/generator/iwbacklinks.php Pages that link to a specified interwiki
Feeder_Query_Generator_Langbacklinks query/generator/langbacklinks.php Pages that link to a given language link
Feeder_Query_Generator_Logevents query/generator/logevents.php Log entries in this wiki
Feeder_Query_Generator_Protectedtitles query/generator/protectedtitles.php Titles protected from creation
Feeder_Query_Generator_Querypage query/generator/querypage.php Entries listed by specified special page
Feeder_Query_Generator_Random query/generator/random.php A random list of pages
Feeder_Query_Generator_Recentchanges query/generator/recentchanges.php Recent changes on this wiki
Feeder_Query_Generator_Search query/generator/search.php Pages that contain a specified string
Feeder_Query_Generator_Tags query/generator/tags.php Change tags valid in this wiki
Feeder_Query_Generator_Usercontribs query/generator/usercontribs.php Contributions by a specified user
Feeder_Query_Generator_Users query/generator/users.php Verbose info about specified users
Feeder_Query_Generator_Watchlist query/generator/watchlist.php Pages in the bot account's watchlist
Feeder_Query_Generator_Watchlistraw query/generator/watchlistraw.php Pages in all logged users watchlists
Feeder_Query_Generator_ByName query/generator/by_name.php Explicitly specified property in the pageset pages

The Feeder_Query_Generator_ByName is a special one. Its creation requires not one, but two parameters. The second parameter is the API name of the generator query submodule you would like to engage. With it, you can access generators that aren't obtained by the currently available feeders. In addition, you may also specify a third parameter - the type of the data elements for this feeder.

Querypage generator feeders

Convenience extensions of the Feeder_Query_Generator_Querypage feeder that pre-specify the special page that will be queried. (For special pages supported by newer versions of the MediaWiki API or some extensions, but not listed here, you can use the vanilla Feeder_Query_Generator_Querypage feeder.)

Class name Defined in file Objects it feeds
Feeder_Query_Generator_Querypage_Ancientpages query/generator/querypage_ancientpages.php Pages that haven't been updated for a long time
Feeder_Query_Generator_Querypage_Brokenredirects query/generator/querypage_brokenredirects.php Redirects that do not point to an existing page
Feeder_Query_Generator_Querypage_Deadendpages query/generator/querypage_deadendpages.php Pages that contain no wikilinks
Feeder_Query_Generator_Querypage_Disambiguations query/generator/querypage_disambiguations.php Disambiguation pages
Feeder_Query_Generator_Querypage_Doubleredirects query/generator/querypage_doubleredirects.php Redirects that point to redirects
Feeder_Query_Generator_Querypage_Fewestrevisions query/generator/querypage_fewestrevisions.php Pages with fewest revisions
Feeder_Query_Generator_Querypage_Listredirects query/generator/querypage_listredirects.php Redirects
Feeder_Query_Generator_Querypage_Lonelypages query/generator/querypage_lonelypages.php Pages that aren't wikilinked to by other pages
Feeder_Query_Generator_Querypage_Longpages query/generator/querypage_longpages.php Pages with longest texts
Feeder_Query_Generator_Querypage_Mostcategories query/generator/querypage_mostcategories.php Pages that belong to greatest number of categorties
Feeder_Query_Generator_Querypage_Mostimages query/generator/querypage_mostimages.php Pages with greatest number of images
Feeder_Query_Generator_Querypage_Mostlinked query/generator/querypage_mostlinked.php Pages that are wikilinked to by most pages
Feeder_Query_Generator_Querypage_Mostlinkedcategories query/generator/querypage_mostlinkedcategories.php Pages that are wikilinked to by most pages
Feeder_Query_Generator_Querypage_Mostlinkedtemplates query/generator/querypage_mostlinkedtemplates.php Templates that are wikilinked to by most pages
Feeder_Query_Generator_Querypage_Mostrevisions query/generator/querypage_mostrevisions.php Pages with greatest number of revisions
Feeder_Query_Generator_Querypage_Shortpages query/generator/querypage_shortpages.php Pages with shortest texts
Feeder_Query_Generator_Querypage_Uncategorizedcategories query/generator/querypage_uncategorizedcategories.php Categories that do not belong to any category
Feeder_Query_Generator_Querypage_Uncategorizedimages query/generator/querypage_uncategorizedimages.php Images that do not belong to any category
Feeder_Query_Generator_Querypage_Uncategorizedtemplates query/generator/querypage_uncategorizedtemplates.php Templates that do not belong to any category
Feeder_Query_Generator_Querypage_Unusedcategories query/generator/querypage_unusedcategories.php Empty categories
Feeder_Query_Generator_Querypage_Unusedimages query/generator/querypage_unusedimages.php Images that are not used in any page
Feeder_Query_Generator_Querypage_Unusedtemplates query/generator/querypage_unusedtemplates.php Templates that are not included in any page
Feeder_Query_Generator_Querypage_Unwatchedpages query/generator/querypage_unwatchedpages.php Pages that do not belong to any watchlist
Feeder_Query_Generator_Querypage_Wantedcategories query/generator/querypage_wantedcategories.php Categories that do not exist but are referred to
Feeder_Query_Generator_Querypage_Wantedfiles query/generator/querypage_wantedfiles.php Files that do not exist but are referred to
Feeder_Query_Generator_Querypage_Wantedpages query/generator/querypage_wantedpages.php Pages that do not exist but are referred to
Feeder_Query_Generator_Querypage_Wantedtemplates query/generator/querypage_wantedtemplates.php Templates that do not exist but are referred to
Feeder_Query_Generator_Querypage_Withoutinterwiki query/generator/querypage_withoutinterwiki.php Pages that do not have interwikis

Property generator feeders

These are based not on a list, but on a pageset, and list these elements of the pageset pages that are essentially pages themselves - for example, the templates included in the pageset pages.

Before starting one of these feeders, you must assign to it some pageset parameters - titles, pageids or revids. These are the pages whose elements will be returned. If you don't specify them, the feeder will not know what to do.

The pageset pages will be examined one by one. If an element belongs to more than one page (eg. a template that is included in more than one page), it will be listed as many times as the pages that include it.

Class name Defined in file Objects it feeds
Feeder_Query_Generator_Categories query/generator/categories.php Categories that the pageset pages belong to
Feeder_Query_Generator_Images query/generator/images.php Images used in the pageset pages
Feeder_Query_Generator_Links query/generator/links.php Pages wikilinked in the pageset pages
Feeder_Query_Generator_Templates query/generator/templates.php Templates included in the pageset pages

Property feeders

These are similar to the property generator feeders, with the difference that they don't allow fetching the properties of the elements that are pages. They allow, however, listing of some page properties that are not pages.

Class name Defined in file Objects it feeds
Feeder_Query_Property_Categories query/property/categories.php Categories that the pageset pages belong to
Feeder_Query_Property_Categoryinfo query/property/categoryinfo.php Values (and keys) that contain info about a category
Feeder_Query_Property_Duplicatefiles query/property/duplicatefiles.php Files that are duplicates of a given file
Feeder_Query_Property_Extlinks query/property/extlinks.php External links included in the pageset pages
Feeder_Query_Property_Imageinfo query/property/imageinfo.php Values (and keys) that contain info about an image
Feeder_Query_Property_Images query/property/images.php Images used in the pageset pages
Feeder_Query_Property_Info query/property/info.php General info about a page
Feeder_Query_Property_Langlinks query/property/langlinks.php Langlinks (wikilinks) in the pageset pages
Feeder_Query_Property_Links query/property/links.php Pages wikilinked in the pageset pages
Feeder_Query_Property_Pageprops query/property/pageprops.php Properties defined in the pageset pages content
Feeder_Query_Property_Revisions query/property/revisions.php Revisions of the pageset pages
Feeder_Query_Property_Templates query/property/templates.php Templates included in the pageset pages
Feeder_Query_Property_ByName query/property/by_name.php Explicitly specified property in the pageset pages

The Feeder_Query_Property_ByName is a special one. Its creation requires not one, but two parameters. The second parameter is the API name of the page property query submodule you would like to engage. With it, you can access page properties that aren't obtained by the currently available feeders. In addition, you may also specify a third parameter - the type of the data elements for this feeder.

Meta info feeders

These supply different kinds of wiki meta-info - site namespaces, user info, wiki messages etc. For details about these, see the MediaWiki API documentation.

The same data can be supplied by similar feeders, called Info feeders, that get it from the wiki info that is cached locally, saving the wiki traffic. However, the cached info might be obsolete. If your caching policy provides for recent enough data and the importance of having the latest data is not that high, use the Info feeders. If you don't refresh the cache frequently and absolutely need recent data, use the Query feeders described here.

Class name Defined in file Objects it feeds
Feeder_Query_Meta_Allmessages query/meta/allmessages.php Wiki messages, all or part of, in a specified language
Feeder_Query_Meta_Dbrepllag query/meta/dbrepllag.php Reply lag for the database server(s)
Feeder_Query_Meta_Extensions query/meta/extensions.php MediaWiki extensions installed in this wiki
Feeder_Query_Meta_Fileextensions query/meta/fileextensions.php File extensions supported by this wiki
Feeder_Query_Meta_Filerepoinfo (v0.40.6+) query/meta/filerepoinfo.php File repositories used by this wiki
Feeder_Query_Meta_General query/meta/general.php Wiki general info values and keys
Feeder_Query_Meta_Interwikimap query/meta/interwikimap.php Interwikis supported by this wiki
Feeder_Query_Meta_Languages query/meta/languages.php Interface languages available at this wiki
Feeder_Query_Meta_Magicwords query/meta/magicwords.php Magic words supported at this wiki
Feeder_Query_Meta_Namespacealiases query/meta/namespacealiases.php Aliases of the namespaces available at this wiki
Feeder_Query_Meta_Namespaces query/meta/namespaces.php Namespaces available at this wiki
Feeder_Query_Meta_Rightsinfo query/meta/rightsinfo.php Wiki rights info values and keys
Feeder_Query_Meta_Siteinfo query/meta/siteinfo.php Wiki siteinfo all-catch feeder
Feeder_Query_Meta_Specialpagealiases query/meta/specialpagealiases.php Aliases of the special pages available at this wiki
Feeder_Query_Meta_Statistics query/meta/statistics.php Wiki statistics values and keys
Feeder_Query_Meta_Usergroups query/meta/usergroups.php User groups available at this wiki
Feeder_Query_Meta_Userinfo query/meta/userinfo.php Current (bot) account info values and keys
Feeder_Query_Meta_ByName query/meta/by_name.php The type of info that is explicitly specified.

The Feeder_Query_Meta_ByName is a special one. Its creation requires not one, but two parameters. The second parameter is the API name of the meta query submodule you would like to engage. With it, you can access types of meta info that aren't obtained by the currently available feeders. In addition, you may also specify a third parameter - the type of the data elements for this feeder.

Wiki info feeders

These supply different kinds of wiki meta-info - site namespaces, user info, wiki messages etc. For details about these, see the MediaWiki API documentation.

The same data can be supplied by similar feeders, called Meta info feeders, that get fetch it from the wiki through API queries. However, this causes extra traffic. If your caching policy provides for recent enough data and the importance of having the latest data is not that high, use the Info feeders. If you don't refresh the cache frequently and absolutely need recent data, better use the Query feeders.

Class name Defined in file Objects it feeds
Feeder_Info_Dbrepllag info/dbrepllag.php Reply lag for the database server(s)
Feeder_Info_Extensions info/extensions.php MediaWiki extensions installed in this wiki
Feeder_Info_Extensiontags info/extensiontags.php Extension tags valid in this wiki
Feeder_Info_Fileextensions info/fileextensions.php File extensions supported by this wiki
Feeder_Info_Functionhooks info/functionhooks.php Function hooks in this wiki
Feeder_Info_Interwikis info/interwikis.php Interwikis supported by this wiki
Feeder_Info_Magicwords info/magicwords.php Magic words supported at this wiki
Feeder_Info_Namespace_Allnames info/namespace_allnames.php All names (incl. aliases) of a given namespace at this wiki
Feeder_Info_Namespacealiases info/namespacealiases.php Aliases of the namespaces available at this wiki
Feeder_Info_Namespaces info/namespaces.php Namespaces available at this wiki
Feeder_Info_Namespaces_Allnames info/namespaces_allnames.php All names (incl. aliases) of all namespaces at this wiki
Feeder_Info_Namespaces_Canonicalnames info/namespaces_canonicalnames.php The canonical names of all namespaces at this wiki
Feeder_Info_Namespaces_Ids info/namespaces_ids.php The ids of all namespaces at this wiki
Feeder_Info_Namespaces_Names info/namespaces_names.php The basic names of all namespaces at this wiki
Feeder_Info_Rightsinfo info/rightsinfo.php Wiki rights info values and keys
Feeder_Info_Showhooks info/showhooks.php All showhooks at this wiki
Feeder_Info_Skins info/skins.php All skins at this wiki
Feeder_Info_Specialpagealiases info/specialpagealiases.php Aliases of the special pages available at this wiki
Feeder_Info_Statistics info/statistics.php Wiki statistics values and keys
Feeder_Info_User_Acceptlang info/user_acceptlang.php Current (bot) account acceptlang info
Feeder_Info_User_Changeablegroups info/user_changeablegroups.php Current (bot) account changeable groups
Feeder_Info_User_Groups info/user_groups.php Current (bot) account groups
Feeder_Info_User_Implicitgroups info/user_implicitgroups.php Current (bot) account implicit groups
Feeder_Info_User_Options info/user_options.php Current (bot) account options (keys and values)
Feeder_Info_User_Ratelimits info/user_ratelimits.php Current (bot) account rate limits (keys and values)
Feeder_Info_User_Rights info/user_rights.php Current (bot) account MediaWiki rights
Feeder_Info_Usergroups info/usergroups.php User groups available at this wiki
Feeder_Info_ByName info/by_name.php The type of info that is explicitly specified.

The Feeder_Info_ByName is a special one. Its creation requires not one, but three parameters. The second parameter is the type of the info array you would like to engage, and the third is the key to the subarray to be supplied by the feeder. With it, you can access types of info that aren't obtained by the currently available feeders. In addition, you may also specify a fourth parameter - the type of the data elements for this feeder.

File records feeders

These supply the records in a file. All have the public property $filename, which must be set to the pathname of the file that must be read.

Currently (Apibot 0.40 alpha 1), only feeders for lines in a text file are implemented.

Class name Defined in file Objects it feeds
Feeder_FileRecords_Lines file_records/lines.php Lines in a text file
Feeder_FileRecords_Multiines file_records/multilines.php Continuing (not ending with '\') lines in a text file

Database feeders (v0.40.5+)

These supply database query records.

Class name Defined in file Objects it feeds Parameter properties
Feeder_DB_MySQL_SQL db/mysql_sql.php The records returned by an SQL query $SQL - the SQL query that must be made
Feeder_DB_MySQL_Table db/mysql_table.php Records in a specified table, matching the conditions given $table - the name of the table to be queried (will not be sanitized!)

$fields - an array with the table fields to return for a record (will not be sanitized!)
$conditions - a string with conditions to limit the selection scope, and/or set order and limit (will not be sanitized!)

Miscellaneous feeders

These supply different other collections of data elements.

Class name Defined in file Objects it feeds Parameter properties
Feeder_Array (v0.40.18+) misc/array.php Values (and keys) in an array $path - the directory to be walked
Feeder_Directory misc/directory.php Entries in a directory (files and subdirectories) $path - the directory to be walked

$maxdepth - maximal subdirs depth to parse entries at
$mindepth - minimal subdirs depth to parse entries at

Feeder_Directory_Files_Contents misc/directory_files_contents.php The bodies of the files in a directory $path - the directory to be walked

$maxdepth - maximal subdirs depth to parse entries at
$mindepth - minimal subdirs depth to parse entries at

Related links