MediaWiki  1.32.5
SpecialPageFactory_deprecated.php
Go to the documentation of this file.
1 <?php
27 
28 // phpcs:disable MediaWiki.Files.ClassMatchesFilename.NotMatch
35  public static function getNames() : array {
36  return MediaWikiServices::getInstance()->getSpecialPageFactory()->getNames();
37  }
38 
39  public static function resolveAlias( $alias ) : array {
40  return MediaWikiServices::getInstance()->getSpecialPageFactory()->resolveAlias( $alias );
41  }
42 
43  public static function exists( $name ) {
44  return MediaWikiServices::getInstance()->getSpecialPageFactory()->exists( $name );
45  }
46 
47  public static function getPage( $name ) {
48  return MediaWikiServices::getInstance()->getSpecialPageFactory()->getPage( $name );
49  }
50 
51  public static function getUsablePages( User $user = null ) : array {
52  global $wgUser;
53  $user = $user ?? $wgUser;
54  return MediaWikiServices::getInstance()->getSpecialPageFactory()->getUsablePages( $user );
55  }
56 
57  public static function getRegularPages() : array {
58  return MediaWikiServices::getInstance()->getSpecialPageFactory()->getRegularPages();
59  }
60 
61  public static function getRestrictedPages( User $user = null ) : array {
62  global $wgUser;
63  $user = $user ?? $wgUser;
64  return MediaWikiServices::getInstance()->getSpecialPageFactory()->getRestrictedPages( $user );
65  }
66 
67  public static function executePath( Title &$title, IContextSource &$context, $including = false,
69  ) {
70  return MediaWikiServices::getInstance()->getSpecialPageFactory()
71  ->executePath( $title, $context, $including, $linkRenderer );
72  }
73 
74  public static function capturePath(
76  ) {
77  return MediaWikiServices::getInstance()->getSpecialPageFactory()
78  ->capturePath( $title, $context, $linkRenderer );
79  }
80 
81  public static function getLocalNameFor( $name, $subpage = false ) {
82  return MediaWikiServices::getInstance()->getSpecialPageFactory()
83  ->getLocalNameFor( $name, $subpage );
84  }
85 
86  public static function getTitleForAlias( $alias ) {
87  return MediaWikiServices::getInstance()->getSpecialPageFactory()
88  ->getTitleForAlias( $alias );
89  }
90 
94  public static function resetList() {
95  }
96 }
$user
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
Definition: hooks.txt:244
SpecialPageFactory
Wrapper for backward compatibility for old callers that used static methods.
Definition: SpecialPageFactory_deprecated.php:34
$context
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
Definition: hooks.txt:2683
MediaWiki\Linker\LinkRenderer
Class that generates HTML links for pages.
Definition: LinkRenderer.php:41
SpecialPageFactory\capturePath
static capturePath(Title $title, IContextSource $context, LinkRenderer $linkRenderer=null)
Definition: SpecialPageFactory_deprecated.php:74
$linkRenderer
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 an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form before processing starts Return false to skip default processing and return $ret $linkRenderer
Definition: hooks.txt:2044
SpecialPageFactory\getUsablePages
static getUsablePages(User $user=null)
Definition: SpecialPageFactory_deprecated.php:51
php
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition: injection.txt:35
$title
namespace and then decline to actually register it file or subcat img or subcat $title
Definition: hooks.txt:964
use
as see the revision history and available at free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
Definition: MIT-LICENSE.txt:10
SpecialPageFactory\exists
static exists( $name)
Definition: SpecialPageFactory_deprecated.php:43
array
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))
SpecialPageFactory\getRegularPages
static getRegularPages()
Definition: SpecialPageFactory_deprecated.php:57
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:302
SpecialPageFactory\resolveAlias
static resolveAlias( $alias)
Definition: SpecialPageFactory_deprecated.php:39
SpecialPageFactory\getTitleForAlias
static getTitleForAlias( $alias)
Definition: SpecialPageFactory_deprecated.php:86
SpecialPageFactory\getLocalNameFor
static getLocalNameFor( $name, $subpage=false)
Definition: SpecialPageFactory_deprecated.php:81
IContextSource
Interface for objects which can provide a MediaWiki context on request.
Definition: IContextSource.php:53
Title
Represents a title within MediaWiki.
Definition: Title.php:39
SpecialPageFactory\resetList
static resetList()
No-op since 1.32, call overrideMwServices() instead.
Definition: SpecialPageFactory_deprecated.php:94
SpecialPageFactory\getRestrictedPages
static getRestrictedPages(User $user=null)
Definition: SpecialPageFactory_deprecated.php:61
SpecialPageFactory\getNames
static getNames()
Definition: SpecialPageFactory_deprecated.php:35
SpecialPageFactory\executePath
static executePath(Title &$title, IContextSource &$context, $including=false, LinkRenderer $linkRenderer=null)
Definition: SpecialPageFactory_deprecated.php:67
SpecialPageFactory\getPage
static getPage( $name)
Definition: SpecialPageFactory_deprecated.php:47
MediaWikiServices
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency MediaWikiServices
Definition: injection.txt:23
User
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition: User.php:47