MediaWiki REL1_32
SpecialPageExecutor Class Reference

Public Member Functions

 executeSpecialPage (SpecialPage $page, $subPage='', WebRequest $request=null, $language=null, User $user=null)
 

Private Member Functions

 getHTMLFromSpecialPage (SpecialPage $page, $subPage)
 
 newContext (WebRequest $request=null, $language=null, User $user=null)
 
 setEditTokenFromUser (DerivativeContext $context)
 If we are trying to edit and no token is set, supply one.
 

Detailed Description

Author
Addshore
Since
1.27

Definition at line 8 of file SpecialPageExecutor.php.

Member Function Documentation

◆ executeSpecialPage()

SpecialPageExecutor::executeSpecialPage ( SpecialPage  $page,
  $subPage = '',
WebRequest  $request = null,
  $language = null,
User  $user = null 
)
Parameters
SpecialPage$pageThe special page to execute
string$subPageThe subpage parameter to call the page with
WebRequest | null$requestWeb request that may contain URL parameters, etc
Language | string | null$languageThe language which should be used in the context
User | null$userThe user which should be used in the context of this special page
Exceptions
Exception
Returns
array [ string, WebResponse ] A two-elements array containing the HTML output generated by the special page as well as the response object.

Definition at line 21 of file SpecialPageExecutor.php.

References $code, $context, $html, $output, $request, $response, $user, getHTMLFromSpecialPage(), HttpStatus\getMessage(), SpecialPage\getPageTitle(), newContext(), and SpecialPage\setContext().

◆ getHTMLFromSpecialPage()

SpecialPageExecutor::getHTMLFromSpecialPage ( SpecialPage  $page,
  $subPage 
)
private
Parameters
SpecialPage$page
string$subPage
Exceptions
Exception
Returns
string HTML

Definition at line 104 of file SpecialPageExecutor.php.

References $html, $output, SpecialPage\execute(), and SpecialPage\getOutput().

Referenced by executeSpecialPage().

◆ newContext()

SpecialPageExecutor::newContext ( WebRequest  $request = null,
  $language = null,
User  $user = null 
)
private
Parameters
WebRequest | null$request
Language | string | null$language
User | null$user
Returns
DerivativeContext

Definition at line 57 of file SpecialPageExecutor.php.

References $context, $request, $user, and setEditTokenFromUser().

Referenced by executeSpecialPage().

◆ setEditTokenFromUser()

SpecialPageExecutor::setEditTokenFromUser ( DerivativeContext  $context)
private

If we are trying to edit and no token is set, supply one.

Parameters
DerivativeContext$context

Definition at line 87 of file SpecialPageExecutor.php.

References $context, and $request.

Referenced by newContext().


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