15 'InterwikiLoadPrefix' => [
16 function ( $prefix, &
$data ) {
17 if ( $prefix ==
'apiquerytestiw' ) {
18 $data = [
'iw_url' =>
'wikipedia' ];
30 'wgCapitalLinks' =>
true,
35 'titles' =>
'Project:articleA|article_B' ] );
45 'fromencoded' =>
false,
46 'from' =>
'Project:articleA',
47 'to' => $to->getPrefixedText(),
49 $data[0][
'query'][
'normalized'][0]
54 'fromencoded' =>
false,
55 'from' =>
'article_B',
58 $data[0][
'query'][
'normalized'][1]
64 while ( !$title || Title::newFromText( $title )->exists() ) {
70 'titles' => $title .
'|Talk:' ] );
107 'wgCapitalLinks' =>
true,
111 $exceptionCaught =
false;
113 $this->
assertEquals( $expected, $api->titlePartToKey( $titlePart, $namespace ) );
115 $exceptionCaught =
true;
117 $this->
assertEquals( $expectException, $exceptionCaught,
118 'ApiUsageException thrown by titlePartToKey' );
139 new FauxRequest( [
'action' =>
'query',
'meta' =>
'siteinfo' ] )
141 $queryApi =
new ApiQuery( $api,
'query' );
142 $modules = $queryApi->getModuleManager()->getNamesWithClasses();
144 foreach (
$modules as $name => $class ) {
147 'Class ' . $class .
' for api module ' . $name .
' does not exist (with exact case)'
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
$wgMetaNamespace
Name of the project namespace.
This is the main API class, used for both external and internal processing.
API Database medium ApiQuery.
testTitlesAreRejectedIfInvalid()
testClassNamesInModuleManager()
Test if all classes in the query module manager exists.
testTitlesGetNormalized()
testTitlesWithWhitespaces()
provideTestTitlePartToKey()
testTitlePartToKey( $titlePart, $namespace, $expected, $expectException)
Test the ApiBase::titlePartToKey function.
This is the main query class.
doApiRequest(array $params, array $session=null, $appendModule=false, User $user=null, $tokenType=null)
Does the API request and returns the result.
Exception used to abort API execution with an error.
WebRequest clone which takes values from a provided array.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return true
processing should stop and the error should be shown to the user * false
returning false will NOT prevent logging $e
$data
Utility to generate mapping file used in mw.Title (phpCharToUpper.json)