MediaWiki  REL1_19
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, $exclude_patterns)
 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
 $doxygenTemplate = $mwPath . 'maintenance/Doxyfile'
 doxygen configuration template for mediawiki
 $doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR
 where Phpdoc should output documentation
 $doxyVersion = 'master'
 $exclude_patterns = ''
if(is_array($argv)) if($input===
'') switch($input) 
$excludedPaths = $mwPath . join( " $mwPath", $mwExcludePaths )
 $generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $doxyVersion, $input, $excludedPaths, $exclude_patterns )
 $input = ''
 Variable to get user input.
 $mwExcludePaths
 Ignored paths relative to $mwPath.
if(php_sapi_name()!= 'cli') $mwPath = dirname( dirname( __FILE__ ) ) . 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 85 of file mwdocgen.php.


Function Documentation

generateConfigFile ( doxygenTemplate,
outputDirectory,
stripFromPath,
currentVersion,
input,
exclude,
exclude_patterns 
)

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
$exclude_patternsString: Additionals path regex to exclude (LocalSettings.php, AdminSettings.php, .svn and .git directories are always excluded)
Returns:
string

Definition at line 113 of file mwdocgen.php.

References $doxygenTemplate, $exclude, $exclude_patterns, $input, and wfTempDir().

Here is the call graph for this function:

readaline ( prompt = '')

Read a line from the shell.

Parameters:
$promptString
Returns:
string

Definition at line 93 of file mwdocgen.php.

References print.


Variable Documentation

$doxygenBin = 'doxygen'

doxygen binary script

Definition at line 55 of file mwdocgen.php.

$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 61 of file mwdocgen.php.

$doxyVersion = 'master'

Definition at line 63 of file mwdocgen.php.

$exclude_patterns = ''

Definition at line 79 of file mwdocgen.php.

Referenced by generateConfigFile().

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

Definition at line 241 of file mwdocgen.php.

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

Definition at line 244 of file mwdocgen.php.

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

Ignored paths relative to $mwPath.

Definition at line 72 of file mwdocgen.php.

if (php_sapi_name()!= 'cli') $mwPath = dirname( dirname( __FILE__ ) ) . 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 66 of file mwdocgen.php.

$mwPathL = $mwPath . 'languages/'

Definition at line 67 of file mwdocgen.php.

$mwPathM = $mwPath . 'maintenance/'

Definition at line 68 of file mwdocgen.php.

$mwPathS = $mwPath . 'skins/'

Definition at line 69 of file mwdocgen.php.

Definition at line 255 of file mwdocgen.php.

Definition at line 242 of file mwdocgen.php.