MediaWiki
REL1_19
|
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...
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. |
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.
Definition at line 32 of file SpecialBooksources.php.
Constructor.
Definition at line 42 of file SpecialBooksources.php.
static SpecialBookSources::cleanIsbn | ( | $ | isbn | ) | [static, private] |
Trim ISBN and remove characters which aren't required.
$isbn | Unclean ISBN |
Definition at line 106 of file SpecialBooksources.php.
References $isbn.
Referenced by execute(), and isValidISBN().
SpecialBookSources::execute | ( | $ | isbn | ) |
Show the special page.
$isbn | ISBN 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().
static SpecialBookSources::isValidISBN | ( | $ | isbn | ) | [static] |
Returns whether a given ISBN (10 or 13) is valid.
True indicates validity.
isbn | ISBN passed for check |
Definition at line 68 of file SpecialBooksources.php.
References $isbn, and cleanIsbn().
SpecialBookSources::makeForm | ( | ) | [private] |
Generate a form to allow users to enter an ISBN.
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().
SpecialBookSources::makeListItem | ( | $ | label, |
$ | url | ||
) | [private] |
Format a book source list item.
$label | Book source label |
$url | Book source URL |
Definition at line 167 of file SpecialBooksources.php.
References $url.
Referenced by showList().
SpecialBookSources::showList | ( | ) | [private] |
Determine where to get the list of book sources from, format and output them.
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().
SpecialBookSources::$isbn = '' [private] |
ISBN passed to the page, if any.
Definition at line 37 of file SpecialBooksources.php.
Referenced by cleanIsbn(), execute(), and isValidISBN().