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  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 }
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
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:1978
static getLocalNameFor( $name, $subpage=false)
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
The User object encapsulates all of the user-specific settings (user_id, name, rights, email address, options, last login time).
Definition: User.php:51
Class that generates HTML links for pages.
Wrapper for backward compatibility for old callers that used static methods.
static getRestrictedPages(User $user=null)
static resetList()
No-op since 1.32, call overrideMwServices() instead.
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not null
Definition: hooks.txt:773
static capturePath(Title $title, IContextSource $context, LinkRenderer $linkRenderer=null)
namespace and then decline to actually register it file or subcat img or subcat $title
Definition: hooks.txt:918
static getUsablePages(User $user=null)
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
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:2627
static executePath(Title &$title, IContextSource &$context, $including=false, LinkRenderer $linkRenderer=null)
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:277
return true to allow those checks to and false if checking is done & $user
Definition: hooks.txt:1460