[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/site/ -> MediaWikiSite.php (summary)

Class representing a MediaWiki site. 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.

Author: John Erling Blad < [email protected] >
Author: Daniel Kinzler
Author: Jeroen De Dauw < [email protected] >
License: GNU GPL v2+
File Size: 356 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

MediaWikiSite:: (12 methods):
  newFromGlobalId()
  __construct()
  toDBKey()
  normalizePageName()
  extractPageRecord()
  getLinkPathType()
  getRelativePagePath()
  getRelativeFilePath()
  setPagePath()
  setFilePath()
  getPageUrl()
  getFileUrl()


Class: MediaWikiSite  - X-Ref

Class representing a MediaWiki site.

newFromGlobalId( $globalId )   X-Ref

param: int $globalId
return: MediaWikiSite

__construct( $type = self::TYPE_MEDIAWIKI )   X-Ref
Constructor.

param: string $type

toDBKey( $title )   X-Ref
Returns the database form of the given title.

param: string $title The target page's title, in normalized form.
return: string

normalizePageName( $pageName )   X-Ref
Returns the normalized form of the given page title, using the
normalization rules of the given site. If the given title is a redirect,
the redirect weill be resolved and the redirect target is returned.

param: string $pageName
return: string

extractPageRecord( $externalData, $pageTitle )   X-Ref
Get normalization record for a given page title from an API response.

param: array $externalData A reply from the API on a external server.
param: string $pageTitle Identifies the page at the external site, needing normalization.
return: array|bool A 'page' structure representing the page identified by $pageTitle.

getLinkPathType()   X-Ref
No description

getRelativePagePath()   X-Ref
Returns the relative page path.

return: string

getRelativeFilePath()   X-Ref
Returns the relative file path.

return: string

setPagePath( $path )   X-Ref
Sets the relative page path.

param: string $path

setFilePath( $path )   X-Ref
Sets the relative file path.

param: string $path

getPageUrl( $pageName = false )   X-Ref

param: string|bool $pageName Page name or false (default: false)
return: string

getFileUrl( $path = false )   X-Ref
Returns the full file path (ie site url + relative file path).
The path should go at the $1 marker. If the $path
argument is provided, the marker will be replaced by it's value.

param: string|bool $path
return: string



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1