MediaWiki  REL1_20
mwdocgen.php File Reference

Generate class and file reference documentation for MediaWiki using doxygen. More...

Go to the source code of this file.

Enumerations

enum  MEDIAWIKI

Functions

 generateConfigFile ($doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $input, $exclude, $excludePatterns, $doxyGenerateMan)
 Generate a configuration file given user parameters and return the temporary filename.
 readaline ($prompt= '')
 Read a line from the shell.

Variables

 $command = $doxygenBin . ' ' . $generatedConf
 $doxygenBin = 'doxygen'
 doxygen binary script
 $doxyGenerateMan = false
 Whether to generates man pages:
 $doxygenInputFilter = "php {$mwPath}maintenance/mwdoc-filter.php"
 doxygen input filter to tweak source file before they are parsed
 $doxygenTemplate = $mwPath . 'maintenance/Doxyfile'
 doxygen configuration template for mediawiki
 $doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR
 where Phpdoc should output documentation
 $doxyVersion = 'master'
if(is_array($argv)) if($input===
'') switch($input) 
$excludedPaths = $mwPath . join( " $mwPath", $mwExcludePaths )
 $excludePatterns = ''
 $generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $doxyVersion, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan )
 $input = ''
 Variable to get user input.
 $mwExcludePaths
 Ignored paths relative to $mwPath.
if(php_sapi_name()!= 'cli') $mwPath = dirname( __DIR__ ) . DIRECTORY_SEPARATOR
 Figure out the base directory for MediaWiki location.
 $mwPathI = $mwPath . 'includes/'
 MediaWiki subpaths.
 $mwPathL = $mwPath . 'languages/'
 $mwPathM = $mwPath . 'maintenance/'
 $mwPathS = $mwPath . 'skins/'
 echo
print EXCLUDE

Detailed Description

Generate class and file reference documentation for MediaWiki using doxygen.

If the dot DOT language processor is available, attempt call graph generation.

Usage: php mwdocgen.php

KNOWN BUGS:

  • pass_thru seems to always use buffering (even with ob_implicit_flush()), that make output slow when doxygen parses language files.
  • the menu doesnt work, got disabled at revision 13740. Need to code it.

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 2 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

Todo:
document
Author:
Antoine Musso <hashar at="" free="" dot="" fr>="">
Brion Vibber
Alexandre Emsenhuber
Version:
first release

Definition in file mwdocgen.php.


Enumeration Type Documentation

enum MEDIAWIKI

Definition at line 90 of file mwdocgen.php.


Function Documentation

generateConfigFile ( doxygenTemplate,
outputDirectory,
stripFromPath,
currentVersion,
input,
exclude,
excludePatterns,
doxyGenerateMan 
)

Generate a configuration file given user parameters and return the temporary filename.

Parameters:
$doxygenTemplateString: full path for the template.
$outputDirectoryString: directory where the stuff will be output.
$stripFromPathString: path that should be stripped out (usually mediawiki base path).
$currentVersionString: Version number of the software
$inputString: Path to analyze.
$excludeString: Additionals path regex to exclude
$excludePatternsString: Additionals path regex to exclude (LocalSettings.php, AdminSettings.php, .svn and .git directories are always excluded)
$doxyGenerateManBoolean
Returns:
string

Definition at line 119 of file mwdocgen.php.

References $doxyGenerateMan, $doxygenInputFilter, $doxygenTemplate, $exclude, $excludePatterns, $input, and wfTempDir().

readaline ( prompt = '')

Read a line from the shell.

Parameters:
$promptString
Returns:
string

Definition at line 98 of file mwdocgen.php.

References print.


Variable Documentation

$doxygenBin = 'doxygen'

doxygen binary script

Definition at line 55 of file mwdocgen.php.

$doxyGenerateMan = false

Whether to generates man pages:

Definition at line 84 of file mwdocgen.php.

Referenced by generateConfigFile().

$doxygenInputFilter = "php {$mwPath}maintenance/mwdoc-filter.php"

doxygen input filter to tweak source file before they are parsed

Definition at line 61 of file mwdocgen.php.

Referenced by generateConfigFile().

$doxygenTemplate = $mwPath . 'maintenance/Doxyfile'

doxygen configuration template for mediawiki

Definition at line 58 of file mwdocgen.php.

Referenced by generateConfigFile().

$doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR

where Phpdoc should output documentation

Definition at line 64 of file mwdocgen.php.

$doxyVersion = 'master'

Definition at line 66 of file mwdocgen.php.

if (is_array($argv)) if ($input=== '') switch ($input) $excludedPaths = $mwPath . join( " $mwPath", $mwExcludePaths )

Definition at line 248 of file mwdocgen.php.

$excludePatterns = ''

Definition at line 82 of file mwdocgen.php.

Referenced by generateConfigFile().

$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $doxyVersion, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan )

Definition at line 251 of file mwdocgen.php.

$mwExcludePaths
Initial value:
 array(
        'images',
        'static',
)

Ignored paths relative to $mwPath.

Definition at line 75 of file mwdocgen.php.

if (php_sapi_name()!= 'cli') $mwPath = dirname( __DIR__ ) . DIRECTORY_SEPARATOR

Figure out the base directory for MediaWiki location.

Definition at line 52 of file mwdocgen.php.

$mwPathI = $mwPath . 'includes/'

MediaWiki subpaths.

Definition at line 69 of file mwdocgen.php.

$mwPathL = $mwPath . 'languages/'

Definition at line 70 of file mwdocgen.php.

$mwPathM = $mwPath . 'maintenance/'

Definition at line 71 of file mwdocgen.php.

$mwPathS = $mwPath . 'skins/'

Definition at line 72 of file mwdocgen.php.

Definition at line 262 of file mwdocgen.php.

Referenced by CheckLanguageCLI\__construct(), TrackBlobs\__construct(), CheckExtensionsCLI\__construct(), TableDiffFormatter\_added(), DiffFormatter\_changed(), TableDiffFormatter\_changed(), TableDiffFormatter\_context(), TableDiffFormatter\_deleted(), DiffFormatter\_lines(), DiffFormatter\_start_block(), TableDiffFormatter\_start_block(), benchmarkTest(), wikiStatsOutput\blockend(), textStatsOutput\blockend(), csvStatsOutput\blockend(), wikiStatsOutput\blockstart(), MonoBookTemplate\cactions(), CheckStorage\check(), UserDupes\checkDupes(), TrackBlobs\checkIntegrity(), CheckExtensionsCLI\checkLanguage(), codepointToUtf8(), RecompressTracked\critical(), MonoBookTemplate\customBox(), DjVuImage\dump(), DjVuImage\dumpForm(), ConfEditor\dumpTokens(), wikiStatsOutput\element(), textStatsOutput\element(), csvStatsOutput\element(), StorageTypeStats\execute(), UserloginTemplate\execute(), BenchmarkDeleteTruncate\execute(), DatabaseLag\execute(), UpdateLogging\execute(), UsercreateTemplate\execute(), PurgeParserCache\execute(), PPFuzzTester\execute(), ModernTemplate\execute(), ChangesFeed\execute(), MonoBookTemplate\execute(), LegacyTemplate\execute(), VectorTemplate\execute(), TrackBlobs\findOrphanBlobs(), wikiStatsOutput\footer(), ForkController\forkWorkers(), GenerateNormalizerData\generateArabic(), GenerateNormalizerData\generateMalayalam(), WebInstallerOutput\getJQuery(), wikiStatsOutput\heading(), QuickTemplate\html(), CheckStorage\importRevision(), RecompressTracked\info(), ApiFormatBase\initPrinter(), QuickTemplate\jstext(), MonoBookTemplate\languageBox(), SeleniumTester\listBrowsers(), JSMinPlus\min(), QuickTemplate\msg(), BaseTemplate\msg(), QuickTemplate\msgHtml(), BaseTemplate\msgHtml(), QuickTemplate\msgWiki(), BaseTemplate\msgWiki(), my_assert(), WikiImporter\notice(), RawAction\onView(), CheckLanguageCLI\outputText(), CheckLanguageCLI\outputWiki(), StreamFile\prepareForStream(), MWExceptionHandler\printError(), SkinTemplate\printOrError(), ApiFormatBase\printText(), BaseTemplate\printTrail(), PurgeRedundantText(), removeDupes(), VectorTemplate\renderNavigation(), VectorTemplate\renderPortal(), VectorTemplate\renderPortals(), MWExceptionHandler\report(), DBConnectionError\reportHTML(), MWException\reportHTML(), ResourceLoader\respond(), CheckStorage\restoreText(), MonoBookTemplate\searchBox(), showDiffs(), CliInstaller\showError(), CliInstaller\showMessage(), PurgeParserCache\showProgress(), CliInstaller\showStatusMessage(), showUsage(), BackupReader\skippedNamespace(), ForkController\start(), DbTestRecorder\start(), SeleniumTester\startServer(), SeleniumServerManager\startServerOnUnix(), SeleniumTester\stopServer(), QuickTemplate\text(), MonoBookTemplate\toolbox(), TrackBlobs\trackOrphanText(), TrackBlobs\trackRevisions(), ResourceLoader\tryRespondFromFileCache(), wfCountDown(), wfOut(), wfPHPVersionError(), wfThumbError(), SeleniumTestConsoleLogger\write(), MessageWriter\writeMessagesToFile(), and CleanUpTest\XtestAllChars().

Definition at line 249 of file mwdocgen.php.