MediaWiki  1.34.0
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,
68  LinkRenderer $linkRenderer = null
69  ) {
70  return MediaWikiServices::getInstance()->getSpecialPageFactory()
71  ->executePath( $title, $context, $including, $linkRenderer );
72  }
73 
74  public static function capturePath(
75  Title $title, IContextSource $context, LinkRenderer $linkRenderer = null
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 }
SpecialPageFactory
Wrapper for backward compatibility for old callers that used static methods.
Definition: SpecialPageFactory_deprecated.php:34
MediaWiki\MediaWikiServices
MediaWikiServices is the service locator for the application scope of MediaWiki.
Definition: MediaWikiServices.php:117
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
SpecialPageFactory\getUsablePages
static getUsablePages(User $user=null)
Definition: SpecialPageFactory_deprecated.php:51
$title
$title
Definition: testCompression.php:34
SpecialPageFactory\exists
static exists( $name)
Definition: SpecialPageFactory_deprecated.php:43
SpecialPageFactory\getRegularPages
static getRegularPages()
Definition: SpecialPageFactory_deprecated.php:57
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
$context
$context
Definition: load.php:45
Title
Represents a title within MediaWiki.
Definition: Title.php:42
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
User
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition: User.php:51