MediaWiki  1.28.0
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. More...
 

Detailed Description

Author
Addshore
Since
1.27

Definition at line 8 of file SpecialPageExecutor.php.

Member Function Documentation

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().

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

Definition at line 101 of file SpecialPageExecutor.php.

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

Referenced by executeSpecialPage().

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, RequestContext\getMain(), and setEditTokenFromUser().

Referenced by executeSpecialPage().

SpecialPageExecutor::setEditTokenFromUser ( DerivativeContext  $context)
private

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

Parameters
DerivativeContext$context

Definition at line 84 of file SpecialPageExecutor.php.

References $request, DerivativeContext\getRequest(), and DerivativeContext\getUser().

Referenced by newContext().


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