MobileFrontend
MobileoptimisedfrontendforMediaWiki
MockApiMobileView Class Reference
+ Inheritance diagram for MockApiMobileView:
+ Collaboration diagram for MockApiMobileView:

Public Member Functions

 __construct (ApiMain $main, $action)
 
 getAllowedParams ()
 Get allowed Api parameters. More...
 
- Public Member Functions inherited from ApiMobileView
 __construct ( $main, $action)
 Run constructor of ApiBase. More...
 
 getMobileViewPageProps ( $propNames, $data)
 Obtain the requested page properties. More...
 
 execute ()
 Execute the requested Api actions. More...
 
 getHelpUrls ()
 Returns the Help URL for this Api. More...
 

Public Attributes

 $mockFile
 
- Public Attributes inherited from ApiMobileView
const CACHE_VERSION = 9
 Increment this when changing the format of cached data.
 

Protected Member Functions

 makeTitle ( $name)
 Creates and validates a title. More...
 
 getParserOutput (WikiPage $wikiPage, ParserOptions $parserOptions, $oldid=null)
 Performs a page parse. More...
 
 makeWikiPage (Title $title)
 Creates a WikiPage from title. More...
 
 makeParserOptions (WikiPage $wikiPage)
 Call makeParserOptions on a WikiPage with the wrapper output class disabled. More...
 
 findFile ( $title, $options=[])
 Wrapper for wfFindFile. More...
 
 getPageImage (Title $title)
 Wrapper that returns a page image for a given title. More...
 
- Protected Member Functions inherited from ApiMobileView
 isMainPage ( $title)
 Check if page is the main page after follow redirect when followRedirects is true. More...
 
 parseSectionsData ( $html, Title $title, ParserOutput $parserOutput, $revId=null)
 Parses section data. More...
 
 getExamplesMessages ()
 Returns usage examples for this module. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ApiMobileView
static getRequestedSectionIds ( $str, $data, &$missingSections)
 Parses requested sections string into a list of sections. More...
 
- Protected Attributes inherited from ApiMobileView
 $usePageImages
 

Member Function Documentation

◆ findFile()

MockApiMobileView::findFile (   $title,
  $options = [] 
)
protected

Wrapper for wfFindFile.

Parameters
Title | string$titlePage title
array$optionsOptions for wfFindFile (see RepoGroup::findFile)
Returns
File|false

Reimplemented from ApiMobileView.

◆ getAllowedParams()

MockApiMobileView::getAllowedParams ( )

Get allowed Api parameters.

Returns
array

Reimplemented from ApiMobileView.

◆ getPageImage()

MockApiMobileView::getPageImage ( Title  $title)
protected

Wrapper that returns a page image for a given title.

Parameters
Title$titlePage title
Returns
File|false

Reimplemented from ApiMobileView.

◆ getParserOutput()

MockApiMobileView::getParserOutput ( WikiPage  $wikiPage,
ParserOptions  $parserOptions,
  $oldid = null 
)
protected

Performs a page parse.

Parameters
WikiPage$wikiPage
ParserOptions$parserOptions
null | int$oldidRevision ID to get the text from, passing null or 0 will get the current revision (default value)
Returns
ParserOutput|bool

Reimplemented from ApiMobileView.

◆ makeParserOptions()

MockApiMobileView::makeParserOptions ( WikiPage  $wikiPage)
protected

Call makeParserOptions on a WikiPage with the wrapper output class disabled.

Parameters
WikiPage$wikiPageto call makeParserOptions on.
Returns
ParserOptions

Reimplemented from ApiMobileView.

◆ makeTitle()

MockApiMobileView::makeTitle (   $name)
protected

Creates and validates a title.

Parameters
string$nameTitle content
Returns
Title

Reimplemented from ApiMobileView.

◆ makeWikiPage()

MockApiMobileView::makeWikiPage ( Title  $title)
protected

Creates a WikiPage from title.

Parameters
Title$titlePage title
Returns
WikiPage

Reimplemented from ApiMobileView.


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