Minor documentation fixes too
Change-Id: Iabf858c30d45073cb82da398d6f9e6f5bb310b34
* Initialises this object with an ID
*
* @param $id
+ * @throws MWException
*/
function load( $id ) {
global $wgContLang;
var $baseRegex, $regex;
var $matches;
+ /**
+ * @param $names array
+ */
function __construct( $names = array() ) {
$this->names = $names;
}
return $newRegex;
}
+ /**
+ * @since 1.20
+ * @return array
+ */
+ public function getNames() {
+ return $this->names;
+ }
+
/**
* Parse a match array from preg_match
* Returns array(magic word ID, parameter value)
*
* @param $m array
*
+ * @throws MWException
* @return array
*/
function parseMatch( $m ) {
$regexes = $this->getVariableStartToEndRegex();
foreach ( $regexes as $regex ) {
if ( $regex !== '' ) {
- $m = false;
+ $m = array();
if ( preg_match( $regex, $text, $m ) ) {
return $this->parseMatch( $m );
}