var $autoSumm = '';
var $hookError = '';
#var $mPreviewTemplates;
+
+ /**
+ * @var ParserOutput
+ */
var $mParserOutput;
+
var $mBaseRevision = false;
var $mShowSummaryField = true;
return $previewhead . $previewHTML . $this->previewTextAfterContent;
}
+ /**
+ * @return Array
+ */
function getTemplates() {
if ( $this->preview || $this->section != '' ) {
$templates = array();
- if ( !isset( $this->mParserOutput ) ) return $templates;
+ if ( !isset( $this->mParserOutput ) ) {
+ return $templates;
+ }
foreach( $this->mParserOutput->getTemplates() as $ns => $template) {
foreach( array_keys( $template ) as $dbk ) {
$templates[] = Title::makeTitle($ns, $dbk);
: $text;
}
+ /**
+ * @param $request WebRequest
+ * @param $text string
+ * @return string
+ */
function safeUnicodeText( $request, $text ) {
$text = rtrim( $text );
return $request->getBool( 'safemode' )
* This is a wrapper around newFromId().
*
* @param $user User
- * @return mixed ExternalUser or false
+ * @return ExternalUser|false
*/
public static function newFromUser( $user ) {
global $wgExternalAuthType;
/**
* Get a MagicWordArray of double-underscore entities
*
- * @return array
+ * @return MagicWordArray
*/
static function getDoubleUnderscoreArray() {
if ( is_null( self::$mDoubleUnderscoreArray ) ) {
/**
* @private
+ *
+ * @return bool
*/
function haveMsg( $str ) {
$msg = $this->translator->translate( $str );
var $mImageParamsMagicArray = array();
var $mMarkerIndex = 0;
var $mFirstCall = true;
- var $mVariables, $mSubstWords; # Initialised by initialiseVariables()
+
+ # Initialised by initialiseVariables()
+ var $mVariables;
+
+ /**
+ * @var MagicWordArray
+ */
+ var $mSubstWords;
var $mConf, $mPreprocessor, $mExtLinkBracketedRegex, $mUrlProtocols; # Initialised in constructor
# Cleared with clearState():
var $mStripState;
var $mIncludeCount, $mArgStack, $mLastSection, $mInPre;
- var $mLinkHolders, $mLinkID;
+ /**
+ * @var LinkHolderArray
+ */
+ var $mLinkHolders;
+
+ var $mLinkID;
var $mIncludeSizes, $mPPNodeCount, $mDefaultSort;
var $mTplExpandCache; # empty-frame expansion cache
var $mTplRedirCache, $mTplDomCache, $mHeadings, $mDoubleUnderscores;
/**
* Transclude an interwiki link.
*
+ * @param $title Title
+ * @param $action
+ *
* @return string
*/
function interwikiTransclude( $title, $action ) {
return $ret;
}
+ /**
+ * @param $caption
+ * @param $holders LinkHolderArray
+ * @return mixed|String
+ */
protected function stripAltText( $caption, $holders ) {
# Strip bad stuff out of the title (tooltip). We can't just use
# replaceLinkHoldersText() here, because if this function is called
/**
* Makes an object that, when expand()ed, will be the same as one obtained
* with implode()
+ *
+ * @return array
*/
function virtualImplode( $sep /*, ... */ ) {
$args = array_slice( func_get_args(), 1 );
$this->node = $node;
}
+ /**
+ * @return DOMXPath
+ */
function getXPath() {
if ( $this->xpath === null ) {
$this->xpath = new DOMXPath( $this->node->ownerDocument );
return $s;
}
+ /**
+ * @return bool|PPNode_DOM
+ */
function getChildren() {
return $this->node->childNodes ? new self( $this->node->childNodes ) : false;
}
+ /**
+ * @return bool|PPNode_DOM
+ */
function getFirstChild() {
return $this->node->firstChild ? new self( $this->node->firstChild ) : false;
}
+ /**
+ * @return bool|PPNode_DOM
+ */
function getNextSibling() {
return $this->node->nextSibling ? new self( $this->node->nextSibling ) : false;
}
+ /**
+ * @param $type
+ *
+ * @return bool|PPNode_DOM
+ */
function getChildrenOfType( $type ) {
return new self( $this->getXPath()->query( $type, $this->node ) );
}
+ /**
+ * @return int
+ */
function getLength() {
if ( $this->node instanceof DOMNodeList ) {
return $this->node->length;
}
}
+ /**
+ * @param $i
+ * @return bool|PPNode_DOM
+ */
function item( $i ) {
$item = $this->node->item( $i );
return $item ? new self( $item ) : false;
}
+ /**
+ * @return string
+ */
function getName() {
if ( $this->node instanceof DOMNodeList ) {
return '#nodelist';
* name PPNode name
* index String index
* value PPNode value
+ *
+ * @return array
*/
function splitArg() {
$xpath = $this->getXPath();
/**
* Split an <ext> node into an associative array containing name, attr, inner and close
* All values in the resulting array are PPNodes. Inner and close are optional.
+ *
+ * @return array
*/
function splitExt() {
$xpath = $this->getXPath();
$this->parser = $parser;
}
+ /**
+ * @return PPFrame_Hash
+ */
function newFrame() {
return new PPFrame_Hash( $this );
}
+ /**
+ * @param $args
+ * @return PPCustomFrame_Hash
+ */
function newCustomFrame( $args ) {
return new PPCustomFrame_Hash( $this, $args );
}
var $numberedArgs, $namedArgs, $parent;
var $numberedExpansionCache, $namedExpansionCache;
+ /**
+ * @param $preprocessor
+ * @param $parent
+ * @param $numberedArgs array
+ * @param $namedArgs array
+ * @param $title Title
+ */
function __construct( $preprocessor, $parent = false, $numberedArgs = array(), $namedArgs = array(), $title = false ) {
parent::__construct( $preprocessor );
}
/**
* Returns true if there are no arguments in this frame
+ *
+ * @return bool
*/
function isEmpty() {
return !count( $this->numberedArgs ) && !count( $this->namedArgs );
}
+ /**
+ * @return array
+ */
function getArguments() {
$arguments = array();
foreach ( array_merge(
return $arguments;
}
+ /**
+ * @return array
+ */
function getNumberedArguments() {
$arguments = array();
foreach ( array_keys($this->numberedArgs) as $key ) {
return $arguments;
}
+ /**
+ * @return array
+ */
function getNamedArguments() {
$arguments = array();
foreach ( array_keys($this->namedArgs) as $key ) {