makeTableCallback()
makeTableCallback(array $matches)
Callback used by a preg_replace_callback in nextPage to make a table
Parameters
array | $matches | of table cells |
SeekQuarry/Yioop -- Open Source Pure PHP Search Engine, Crawler, and Indexer
Copyright (C) 2009 - 2020 Chris Pollett chris@pollett.org
LICENSE:
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 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
END LICENSE
WikiParser | Class with methods to parse mediawiki documents, both within Yioop, and when Yioop indexes mediawiki dumps as from Wikipedia. |
citeCallback(array $matches, integer $init = -1) : string
Used to convert {{cite }} to a numbered link to a citation
array | $matches | from regular expression to check for {{cite }} |
integer | $init | used to initialize counter for citations |
a HTML link to citation in current document
base64EncodeCallback(array $matches) : string
Callback used to base64 encode the contents of nowiki tags so they won't be manipulated by wiki replacements.
array | $matches | $matches[1] should contain the contents of a nowiki tag |
base 64 encoded contents surrounded by an escaped nowiki tag.
spaceEncodeCallback(array $matches) : string
Callback used to encode the contents of pre tags so they won't accidently get sub-pre tags because a bunch of leading lines have spaces
array | $matches | $matches[1] should contain the contents of a pre tag |
encoded contents surrounded by an escaped pre tag.
spanEncodeCallback(array $matches) : string
Callback used to encode the contents of span tags so they newlines within them don't accidentally get treated as new wiki paragraphs
array | $matches | $matches[1] should contain the contents of a span tag |
encoded contents surrounded by an escaped pre tag.
base64DecodeCallback(array $matches) : string
Callback used to base64 decode the contents of previously base64 encoded (@see base64EncodeCallback) nowiki tags after all mediawiki substitutions have been done
array | $matches | $matches[1] should contain the contents of a nowiki tag |
base 64 decoded contents surrounded by a pre-formatted tag.