MediaWiki  master
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  wfDeprecated( __METHOD__, '1.32' );
37  return MediaWikiServices::getInstance()->getSpecialPageFactory()->getNames();
38  }
39 
40  public static function resolveAlias( $alias ) : array {
41  wfDeprecated( __METHOD__, '1.32' );
42  return MediaWikiServices::getInstance()->getSpecialPageFactory()->resolveAlias( $alias );
43  }
44 
45  public static function exists( $name ) {
46  wfDeprecated( __METHOD__, '1.32' );
47  return MediaWikiServices::getInstance()->getSpecialPageFactory()->exists( $name );
48  }
49 
50  public static function getPage( $name ) {
51  wfDeprecated( __METHOD__, '1.32' );
52  return MediaWikiServices::getInstance()->getSpecialPageFactory()->getPage( $name );
53  }
54 
55  public static function getUsablePages( User $user = null ) : array {
56  wfDeprecated( __METHOD__, '1.32' );
57  global $wgUser;
58  $user = $user ?? $wgUser;
59  return MediaWikiServices::getInstance()->getSpecialPageFactory()->getUsablePages( $user );
60  }
61 
62  public static function getRegularPages() : array {
63  wfDeprecated( __METHOD__, '1.32' );
64  return MediaWikiServices::getInstance()->getSpecialPageFactory()->getRegularPages();
65  }
66 
67  public static function getRestrictedPages( User $user = null ) : array {
68  wfDeprecated( __METHOD__, '1.32' );
69  global $wgUser;
70  $user = $user ?? $wgUser;
71  return MediaWikiServices::getInstance()->getSpecialPageFactory()->getRestrictedPages( $user );
72  }
73 
74  public static function executePath( Title &$title, IContextSource &$context, $including = false,
75  LinkRenderer $linkRenderer = null
76  ) {
77  wfDeprecated( __METHOD__, '1.32' );
78  return MediaWikiServices::getInstance()->getSpecialPageFactory()
79  ->executePath( $title, $context, $including, $linkRenderer );
80  }
81 
82  public static function capturePath(
83  Title $title, IContextSource $context, LinkRenderer $linkRenderer = null
84  ) {
85  wfDeprecated( __METHOD__, '1.32' );
86  return MediaWikiServices::getInstance()->getSpecialPageFactory()
87  ->capturePath( $title, $context, $linkRenderer );
88  }
89 
90  public static function getLocalNameFor( $name, $subpage = false ) {
91  wfDeprecated( __METHOD__, '1.32' );
92  return MediaWikiServices::getInstance()->getSpecialPageFactory()
93  ->getLocalNameFor( $name, $subpage );
94  }
95 
96  public static function getTitleForAlias( $alias ) {
97  wfDeprecated( __METHOD__, '1.32' );
98  return MediaWikiServices::getInstance()->getSpecialPageFactory()
99  ->getTitleForAlias( $alias );
100  }
101 
105  public static function resetList() {
106  wfDeprecated( __METHOD__, '1.32' );
107  }
108 }
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:146
MediaWiki\Linker\LinkRenderer
Class that generates HTML links for pages.
Definition: LinkRenderer.php:43
SpecialPageFactory\capturePath
static capturePath(Title $title, IContextSource $context, LinkRenderer $linkRenderer=null)
Definition: SpecialPageFactory_deprecated.php:82
SpecialPageFactory\getUsablePages
static getUsablePages(User $user=null)
Definition: SpecialPageFactory_deprecated.php:55
wfDeprecated
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that $function is deprecated.
Definition: GlobalFunctions.php:1030
$title
$title
Definition: testCompression.php:38
SpecialPageFactory\exists
static exists( $name)
Definition: SpecialPageFactory_deprecated.php:45
SpecialPageFactory\getRegularPages
static getRegularPages()
Definition: SpecialPageFactory_deprecated.php:62
SpecialPageFactory\resolveAlias
static resolveAlias( $alias)
Definition: SpecialPageFactory_deprecated.php:40
SpecialPageFactory\getTitleForAlias
static getTitleForAlias( $alias)
Definition: SpecialPageFactory_deprecated.php:96
SpecialPageFactory\getLocalNameFor
static getLocalNameFor( $name, $subpage=false)
Definition: SpecialPageFactory_deprecated.php:90
IContextSource
Interface for objects which can provide a MediaWiki context on request.
Definition: IContextSource.php:53
$context
$context
Definition: load.php:43
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:105
SpecialPageFactory\getRestrictedPages
static getRestrictedPages(User $user=null)
Definition: SpecialPageFactory_deprecated.php:67
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:74
SpecialPageFactory\getPage
static getPage( $name)
Definition: SpecialPageFactory_deprecated.php:50
User
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition: User.php:55