MediaWiki  REL1_19
SpecialBookSources Class Reference

Special page outputs information on sourcing a book with a particular ISBN The parser creates links to this page when dealing with ISBNs in wikitext. More...

Inheritance diagram for SpecialBookSources:
Collaboration diagram for SpecialBookSources:

List of all members.

Public Member Functions

 __construct ()
 Constructor.
 execute ($isbn)
 Show the special page.

Static Public Member Functions

static isValidISBN ($isbn)
 Returns whether a given ISBN (10 or 13) is valid.

Private Member Functions

 makeForm ()
 Generate a form to allow users to enter an ISBN.
 makeListItem ($label, $url)
 Format a book source list item.
 showList ()
 Determine where to get the list of book sources from, format and output them.

Static Private Member Functions

static cleanIsbn ($isbn)
 Trim ISBN and remove characters which aren't required.

Private Attributes

 $isbn = ''
 ISBN passed to the page, if any.

Detailed Description

Special page outputs information on sourcing a book with a particular ISBN The parser creates links to this page when dealing with ISBNs in wikitext.

Author:
Rob Church <[email protected]>
Todo:
Validate ISBNs using the standard check-digit method

Definition at line 32 of file SpecialBooksources.php.


Constructor & Destructor Documentation

Constructor.

Definition at line 42 of file SpecialBooksources.php.


Member Function Documentation

static SpecialBookSources::cleanIsbn ( isbn) [static, private]

Trim ISBN and remove characters which aren't required.

Parameters:
$isbnUnclean ISBN
Returns:
string

Definition at line 106 of file SpecialBooksources.php.

References $isbn.

Referenced by execute(), and isValidISBN().

Here is the caller graph for this function:

Show the special page.

Parameters:
$isbnISBN passed as a subpage parameter

Reimplemented from SpecialPage.

Definition at line 51 of file SpecialBooksources.php.

References $isbn, cleanIsbn(), SpecialPage\getOutput(), SpecialPage\getRequest(), makeForm(), SpecialPage\outputHeader(), SpecialPage\setHeaders(), and showList().

Here is the call graph for this function:

static SpecialBookSources::isValidISBN ( isbn) [static]

Returns whether a given ISBN (10 or 13) is valid.

True indicates validity.

Parameters:
isbnISBN passed for check

Definition at line 68 of file SpecialBooksources.php.

References $isbn, and cleanIsbn().

Here is the call graph for this function:

Generate a form to allow users to enter an ISBN.

Returns:
string

Definition at line 115 of file SpecialBooksources.php.

References $wgScript, Xml\closeElement(), SpecialPage\getTitle(), Html\hidden(), Xml\inputLabel(), SpecialPage\msg(), Xml\openElement(), and Xml\submitButton().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:

SpecialBookSources::makeListItem ( label,
url 
) [private]

Format a book source list item.

Parameters:
$labelBook source label
$urlBook source URL
Returns:
string

Definition at line 167 of file SpecialBooksources.php.

References $url.

Referenced by showList().

Here is the caller graph for this function:

Determine where to get the list of book sources from, format and output them.

Returns:
string

Definition at line 134 of file SpecialBooksources.php.

References $page, $title, $url, $wgContLang, SpecialPage\getOutput(), makeListItem(), Title\makeTitleSafe(), SpecialPage\msg(), Revision\newFromTitle(), and wfRunHooks().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

SpecialBookSources::$isbn = '' [private]

ISBN passed to the page, if any.

Definition at line 37 of file SpecialBooksources.php.

Referenced by cleanIsbn(), execute(), and isValidISBN().


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