Inherits SpecialPage.
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. | |
| showList () | |
| Determine where to get the list of book sources from, format and output them. | |
| makeListItem ($label, $url) | |
| Format a book source list item. | |
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. | |
Definition at line 11 of file SpecialBooksources.php.
| SpecialBookSources::__construct | ( | ) |
| static SpecialBookSources::cleanIsbn | ( | $ | isbn | ) | [static, private] |
Trim ISBN and remove characters which aren't required.
| $isbn | Unclean ISBN |
Definition at line 88 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 30 of file SpecialBooksources.php.
References $isbn, $wgOut, $wgRequest, cleanIsbn(), makeForm(), 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 48 of file SpecialBooksources.php.
References $i, $isbn, and cleanIsbn().
| SpecialBookSources::makeForm | ( | ) | [private] |
Generate a form to allow users to enter an ISBN.
Definition at line 97 of file SpecialBooksources.php.
References $title, $wgScript, Xml::closeElement(), SpecialPage::getTitleFor(), Xml::hidden(), Xml::inputLabel(), Xml::openElement(), Xml::submitButton(), wfMsg(), and wfMsgHtml().
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 148 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 116 of file SpecialBooksources.php.
References $title, $url, $wgContLang, $wgOut, makeListItem(), Title::makeTitleSafe(), Revision::newFromTitle(), wfMsgForContent(), and wfRunHooks().
Referenced by execute().
SpecialBookSources::$isbn = '' [private] |
ISBN passed to the page, if any.
Definition at line 16 of file SpecialBooksources.php.
Referenced by cleanIsbn(), execute(), and isValidISBN().
1.5.9