Mediawiki 程式說明/Parser

出自六年制學程
在2014年8月31日 (日) 21:09由丁志仁對話 | 貢獻所做的修訂版本

(差異) ←上個修訂 | 最新修訂 (差異) | 下一修訂→ (差異)
跳轉到: 導覽搜尋

以下是 get_class_methods('Parser') 得到的 112 種方法:

 [0] => __construct:建構子
 [1] => __destruct:解構子
 [2] => firstCallInit
 [3] => clearState
 [4] => parse:解析總入口
 [5] => recursiveTagParse
 [6] => preprocess
 [7] => getPreloadText
 [8] => uniqPrefix
 [9] => setTitle
 [10] => getTitle
 [11] => Title
 [12] => setOutputType
 [13] => OutputType
 [14] => getOutput
 [15] => getOptions
 [16] => Options
 [17] => nextLinkID
 [18] => getFunctionLang
 [19] => getPreprocessor:查$this->mPreprocessorClass 將相對應的class new 成物件傳回
 [20] => extractTagsAndParams:替換所有的HTML風格的註釋並給文中的標籤一個隨機的標記
 [21] => getStripList:給出一套XML-like的標籤剝離列表
 [22] => strip:剝離
 [23] => unstrip:反剝離,恢復strip()對pre,math,擴展的移除
 [24] => unstripNoWiki:在unstrip()後,保存順序
 [25] => unstripForHTML:反剝離HTML
 [26] => insertStripItem:加一個剝離項目
 [27] => tidy:產生整潔的HTML
 [28] => doTableStuff:解析表格
 [29] => internalParse:內部解析,水平線
 [30] => doMagicLinks
 [31] => magicLinkCallback
 [32] => makeFreeExternalLink
 [33] => doHeadings:h1-h6
 [34] => doAllQuotes:加粗拉斜
 [35] => doQuotes:加粗拉斜主要解析程式,給 doAllQuotes 用
 [36] => replaceExternalLinks
 [37] => getExternalLinkAttribs
 [38] => replaceUnusualEscapes
 [39] => maybeMakeExternalImage
 [40] => replaceInternalLinks
 [41] => replaceInternalLinks2
 [42] => makeLinkHolder
 [43] => makeKnownLinkHolder
 [44] => armorLinks
 [45] => areSubpagesAllowed
 [46] => maybeDoSubpageLink:將含「.、..、/」的title正規化成合法的title
 [47] => closeParagraph:列表用的函式,結束前一層巢狀列表
 [48] => getCommon:列表用的函式,抓列表共幾個Common(幾層巢狀)
 [49] => openList:列表用的函式,開始列表
 [50] => nextItem:列表用的函式,下一個項目
 [51] => closeList:列表用的函式,結束列表
 [52] => doBlockLevels:ol、ul、dl及*#:;
 [53] => findColonNoLinks:列表用的函式,找出不在a及span中的「:」
 [54] => getVariableValue
 [55] => initialiseVariables
 [56] => preprocessToDom:供getTemplateDom用,叫用getPreprocessor()形成相應物件,然後執行物件中的preprocessToObj方法,形成DOM
 [57] => splitWhitespace
 [58] => replaceVariables:魔術字替換
 [59] => createAssocArgs
 [60] => limitationWarn
 [61] => braceSubstitution:括號內替換,遞歸更換模板中的所有變數或模板,長達300行
 [62] => getTemplateDom($title):將$title代表的頁解譯成DOM傳回,供braceSubstitution用
 [63] => fetchTemplateAndTitle:取用未解析的模板文本
 [64] => fetchTemplate
 [65] => statelessFetchTemplate
 [66] => interwikiTransclude:跨wiki嵌入
 [67] => fetchScaryTemplateMaybeFromCache:跨wiki嵌入,供interwikiTransclude用
 [68] => argSubstitution
 [69] => extensionSubstitution
 [70] => incrementIncludeSize
 [71] => incrementExpensiveFunctionCount
 [72] => doDoubleUnderscore
 [73] => formatHeadings
 [74] => preSaveTransform
 [75] => pstPass2
 [76] => getUserSig
 [77] => validateSig
 [78] => cleanSig:清理簽字文本(含\{\{)
 [79] => cleanSigInSig
 [80] => startExternalParse
 [81] => transformMsg
 [82] => setHook
 [83] => setTransparentTagHook
 [84] => clearTagHooks
 [85] => setFunctionHook
 [86] => getFunctionHooks
 [87] => setFunctionTagHook
 [88] => replaceLinkHolders
 [89] => replaceLinkHoldersText
 [90] => renderImageGallery
 [91] => getImageParams
 [92] => makeImage
 [93] => disableCache
 [94] => attributeStripCallback
 [95] => getTags
 [96] => getSection:從文章中抽取一段,叫用extractSections
 [97] => replaceSection:從文章中取代一段,叫用extractSections
 [98] => getRevisionId
 [99] => getRevisionTimestamp
 [100] => getRevisionUser
 [101] => setDefaultSort
 [102] => getDefaultSort
 [103] => getCustomDefaultSort
 [104] => guessSectionNameFromWikiText
 [105] => guessLegacySectionNameFromWikiText
 [106] => stripSectionName
 [107] => testSrvus
 [108] => testPst
 [109] => testPreprocess
 [110] => markerSkipCallback
 [111] => serialiseHalfParsedText
 [112] => unserialiseHalfParsedText