MediaWiki REL1_34
ImageMap Class Reference

Static Public Member Functions

static onParserFirstCallInit (Parser &$parser)
 
static render ( $input, $params, $parser)
 

Public Attributes

const BOTTOM_LEFT = 2
 
const BOTTOM_RIGHT = 1
 
const NONE = 4
 
const TOP_LEFT = 3
 
const TOP_RIGHT = 0
 

Static Public Attributes

static $id = 0
 

Static Private Member Functions

static error ( $name, $line=false)
 
static tokenizeCoords ( $count, $lineNum)
 

Detailed Description

Definition at line 21 of file ImageMap.php.

Member Function Documentation

◆ error()

static ImageMap::error ( $name,
$line = false )
staticprivate
Parameters
string$name
string | int | bool$line
Returns
string HTML

Definition at line 414 of file ImageMap.php.

References $line, and wfMessage().

Referenced by render(), and tokenizeCoords().

◆ onParserFirstCallInit()

static ImageMap::onParserFirstCallInit ( Parser & $parser)
static
Parameters
Parser&$parser

Definition at line 33 of file ImageMap.php.

References Parser\setHook().

◆ render()

static ImageMap::render ( $input,
$params,
$parser )
static
Parameters
string$input
array$params
Parser$parser
Returns
string HTML (Image map, or error message)

Definition at line 43 of file ImageMap.php.

References $line, $lines, $title, $type, $wgNoFollowLinks, $wgUrlProtocols, BOTTOM_RIGHT, error(), NS_FILE, NS_MEDIA, NS_SPECIAL, tokenizeCoords(), wfFindFile(), wfIsBadImage(), and wfMessage().

◆ tokenizeCoords()

static ImageMap::tokenizeCoords ( $count,
$lineNum )
staticprivate
Parameters
int$count
int | string$lineNum
Returns
array|string String with error (HTML), or array of coordinates

Definition at line 394 of file ImageMap.php.

References error().

Referenced by render().

Member Data Documentation

◆ $id

ImageMap::$id = 0
static

Definition at line 22 of file ImageMap.php.

◆ BOTTOM_LEFT

const ImageMap::BOTTOM_LEFT = 2

Definition at line 26 of file ImageMap.php.

◆ BOTTOM_RIGHT

const ImageMap::BOTTOM_RIGHT = 1

Definition at line 25 of file ImageMap.php.

Referenced by render().

◆ NONE

const ImageMap::NONE = 4

Definition at line 28 of file ImageMap.php.

◆ TOP_LEFT

const ImageMap::TOP_LEFT = 3

Definition at line 27 of file ImageMap.php.

◆ TOP_RIGHT

const ImageMap::TOP_RIGHT = 0

Definition at line 24 of file ImageMap.php.


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