'index',
'noindex',
'staticredirect',
+ 'notitleconvert',
+ 'nocontentconvert',
);
}
/**
- * Returns true if the text contains the word
- * @return bool
+ * Returns the number of times the text contains the word
+ * @return int
*/
function match( $text ) {
return preg_match( $this->getRegex(), $text );
}
/**
- * Returns true if the text starts with the word
- * @return bool
+ * Returns if the text starts with the word
+ * @return int
*/
function matchStart( $text ) {
return preg_match( $this->getRegexStart(), $text );
$matches = array();
$matchcount = preg_match( $this->getVariableStartToEndRegex(), $text, $matches );
if ( $matchcount == 0 ) {
- return NULL;
+ return null;
} else {
# multiple matched parts (variable match); some will be empty because of
# synonyms. The variable will be the second non-empty one so remove any