MediaWiki REL1_32
ProxySpecialPage Class Reference

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. More...

Inheritance diagram for ProxySpecialPage:
Collaboration diagram for ProxySpecialPage:

Public Member Functions

 __call ( $method, $args)
 Magic function that proxies function calls to the target object.
 
 checkPermissions ()
 
 displayRestrictionError ()
 
 execute ( $subPage)
 
 getDescription ()
 
 getLocalName ()
 
 getName ()
 
 getPageTitle ( $subpage=false)
 
 getRestriction ()
 
 including ( $x=null)
 
 isIncludable ()
 
 isListed ()
 
 isRestricted ()
 
 listed ( $x=null)
 
 setContext ( $context)
 
 setListed ( $listed)
 
 userCanExecute (User $user)
 
- Public Member Functions inherited from SpecialPage
 __construct ( $name='', $restriction='', $listed=true, $function=false, $file='', $includable=false)
 Default constructor for special pages Derivative classes should call this from their constructor Note that if the user does not have the required level, an error message will be displayed by the default execute() method, without the global function ever being called.
 
 addHelpLink ( $to, $overrideBaseUrl=false)
 Adds help link with an icon via page indicators.
 
 checkReadOnly ()
 If the wiki is currently in readonly mode, throws a ReadOnlyError.
 
 doesWrites ()
 Indicates whether this special page may perform database writes.
 
 getConfig ()
 Shortcut to get main config object.
 
 getContext ()
 Gets the context this SpecialPage is executed in.
 
 getFinalGroupName ()
 Get the group that the special page belongs in on Special:SpecialPage Use this method, instead of getGroupName to allow customization of the group name from the wiki side.
 
 getFullTitle ()
 Return the full title, including $par.
 
 getLanguage ()
 Shortcut to get user's language.
 
 getLinkRenderer ()
 
 getOutput ()
 Get the OutputPage being used for this instance.
 
 getRequest ()
 Get the WebRequest being used for this instance.
 
 getSkin ()
 Shortcut to get the skin being used for this instance.
 
 getTitle ( $subpage=false)
 Get a self-referential title object.
 
 getUser ()
 Shortcut to get the User executing this instance.
 
 isCached ()
 Is this page cached? Expensive pages are cached or disabled in miser mode.
 
 isExpensive ()
 Is this page expensive (for some definition of expensive)? Expensive pages are disabled or cached in miser mode.
 
 maxIncludeCacheTime ()
 How long to cache page when it is being included.
 
 msg ( $key)
 Wrapper around wfMessage that sets the current context.
 
 outputHeader ( $summaryMessageKey='')
 Outputs a summary message on top of special pages Per default the message key is the canonical name of the special page May be overridden, i.e.
 
 prefixSearchSubpages ( $search, $limit, $offset)
 Return an array of subpages beginning with $search that this special page will accept.
 
 requireLogin ( $reasonMsg='exception-nologin-text', $titleMsg='exception-nologin')
 If the user is not logged in, throws UserNotLoggedIn error.
 
 run ( $subPage)
 Entry point.
 
 setHeaders ()
 Sets headers - this should be called from the execute() method of all derived classes!
 
 setLinkRenderer (LinkRenderer $linkRenderer)
 

Protected Member Functions

 afterExecute ( $subPage)
 
 beforeExecute ( $subPage)
 
 getGroupName ()
 
 getRobotPolicy ()
 
 getTargetPage ()
 Instantiate a SpecialPage based on request parameters.
 
- Protected Member Functions inherited from SpecialPage
 addFeedLinks ( $params)
 Adds RSS/atom links.
 
 checkLoginSecurityLevel ( $level=null)
 Verifies that the user meets the security level, possibly reauthenticating them in the process.
 
 getCacheTTL ()
 
 getLoginSecurityLevel ()
 Tells if the special page does something security-sensitive and needs extra defense against a stolen account (e.g.
 
 getSubpagesForPrefixSearch ()
 Return an array of subpages that this special page will accept for prefix searches.
 
 prefixSearchString ( $search, $limit, $offset)
 Perform a regular substring search for prefixSearchSubpages.
 
 setReauthPostData (array $data)
 Record preserved POST data after a reauthentication.
 
 useTransactionalTimeLimit ()
 Call wfTransactionalTimeLimit() if this request was POSTed.
 

Private Member Functions

 init ()
 Helper function that initializes the target SpecialPage object.
 

Private Attributes

SpecialPage null $target = null
 Target page to execute.
 

Additional Inherited Members

- Static Public Member Functions inherited from SpecialPage
static getSafeTitleFor ( $name, $subpage=false)
 Get a localised Title object for a page name with a possibly unvalidated subpage.
 
static getTitleFor ( $name, $subpage=false, $fragment='')
 Get a localised Title object for a specified special page name If you don't need a full Title object, consider using TitleValue through getTitleValueFor() below.
 
static getTitleValueFor ( $name, $subpage=false, $fragment='')
 Get a localised TitleValue object for a specified special page name.
 
- Static Protected Member Functions inherited from SpecialPage
static prefixSearchArray ( $search, $limit, array $subpages, $offset)
 Helper function for implementations of prefixSearchSubpages() that filter the values in memory (as opposed to making a query).
 
- Protected Attributes inherited from SpecialPage
IContextSource $mContext
 Current request context.
 
 $mIncludable
 
 $mIncluding
 
 $mName
 
 $mRestriction
 

Detailed Description

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html A proxy class that routes a special page to other special pages based on request parameters

Definition at line 23 of file ProxySpecialPage.php.

Member Function Documentation

◆ __call()

ProxySpecialPage::__call ( $method,
$args )

Magic function that proxies function calls to the target object.

Parameters
string$methodMethod name being called
array$argsArray of arguments
Returns
mixed

Definition at line 56 of file ProxySpecialPage.php.

References $args, and init().

◆ afterExecute()

ProxySpecialPage::afterExecute ( $subPage)
protected
Parameters
string | null$subPage

Reimplemented from SpecialPage.

Definition at line 182 of file ProxySpecialPage.php.

References init().

◆ beforeExecute()

ProxySpecialPage::beforeExecute ( $subPage)
protected
Parameters
string | null$subPage

Reimplemented from SpecialPage.

Definition at line 174 of file ProxySpecialPage.php.

References init().

◆ checkPermissions()

ProxySpecialPage::checkPermissions ( )
Returns
void
Exceptions
PermissionsError

Reimplemented from SpecialPage.

Definition at line 166 of file ProxySpecialPage.php.

References init().

◆ displayRestrictionError()

ProxySpecialPage::displayRestrictionError ( )
Exceptions
PermissionsError

Reimplemented from SpecialPage.

Definition at line 157 of file ProxySpecialPage.php.

References init().

◆ execute()

ProxySpecialPage::execute ( $subPage)
Parameters
string | null$subPage

Reimplemented from SpecialPage.

Definition at line 190 of file ProxySpecialPage.php.

References init().

◆ getDescription()

ProxySpecialPage::getDescription ( )
Returns
string

Reimplemented from SpecialPage.

Definition at line 198 of file ProxySpecialPage.php.

References init().

◆ getGroupName()

ProxySpecialPage::getGroupName ( )
protected
Returns
string

Reimplemented from SpecialPage.

Reimplemented in SpecialOATH.

Definition at line 223 of file ProxySpecialPage.php.

References init().

◆ getLocalName()

ProxySpecialPage::getLocalName ( )
Returns
string

Reimplemented from SpecialPage.

Definition at line 81 of file ProxySpecialPage.php.

References init().

◆ getName()

ProxySpecialPage::getName ( )
Returns
string

Reimplemented from SpecialPage.

Definition at line 64 of file ProxySpecialPage.php.

References init().

◆ getPageTitle()

ProxySpecialPage::getPageTitle ( $subpage = false)
Parameters
string | bool$subpage
Returns
Title

Reimplemented from SpecialPage.

Definition at line 73 of file ProxySpecialPage.php.

References init().

◆ getRestriction()

ProxySpecialPage::getRestriction ( )
Returns
string

Reimplemented from SpecialPage.

Definition at line 89 of file ProxySpecialPage.php.

References init().

◆ getRobotPolicy()

ProxySpecialPage::getRobotPolicy ( )
protected
Returns
string

Reimplemented from SpecialPage.

Definition at line 215 of file ProxySpecialPage.php.

References init().

◆ getTargetPage()

ProxySpecialPage::getTargetPage ( )
abstractprotected

Instantiate a SpecialPage based on request parameters.

The page returned by this function will be cached and used as the target page for this proxy object.

Returns
SpecialPage

Reimplemented in SpecialOATH.

Referenced by init().

◆ including()

ProxySpecialPage::including ( $x = null)
Parameters
bool | null$x
Returns
bool

Reimplemented from SpecialPage.

Definition at line 132 of file ProxySpecialPage.php.

References init().

◆ init()

◆ isIncludable()

ProxySpecialPage::isIncludable ( )
Returns
bool

Reimplemented from SpecialPage.

Definition at line 123 of file ProxySpecialPage.php.

References init().

◆ isListed()

ProxySpecialPage::isListed ( )
Returns
bool

Reimplemented from SpecialPage.

Definition at line 97 of file ProxySpecialPage.php.

References init().

◆ isRestricted()

ProxySpecialPage::isRestricted ( )
Returns
bool

Reimplemented from SpecialPage.

Definition at line 140 of file ProxySpecialPage.php.

References init().

◆ listed()

ProxySpecialPage::listed ( $x = null)
Parameters
bool | null$x
Returns
bool

Reimplemented from SpecialPage.

Definition at line 115 of file ProxySpecialPage.php.

References init().

◆ setContext()

ProxySpecialPage::setContext ( $context)
Parameters
IContextSource$context

Reimplemented from SpecialPage.

Definition at line 206 of file ProxySpecialPage.php.

References $context, and init().

◆ setListed()

ProxySpecialPage::setListed ( $listed)
Parameters
bool$listed
Returns
bool

Reimplemented from SpecialPage.

Definition at line 106 of file ProxySpecialPage.php.

References init().

◆ userCanExecute()

ProxySpecialPage::userCanExecute ( User $user)
Parameters
User$user
Returns
bool

Reimplemented from SpecialPage.

Definition at line 149 of file ProxySpecialPage.php.

References init().

Member Data Documentation

◆ $target

SpecialPage null ProxySpecialPage::$target = null
private

Target page to execute.

Definition at line 27 of file ProxySpecialPage.php.


The documentation for this class was generated from the following file: