38require_once __DIR__ .
'/Maintenance.php';
50 parent::__construct();
57 'Pass a MediaWiki version',
60 'Whether to generate man files' );
62 "Only process given file or directory. Multiple values " .
63 "accepted with comma separation. Path relative to \$IP.",
66 'Path to write doc to',
69 'Ignore extensions' );
76 protected function init() {
79 $this->doxygen = $this->
getOption(
'doxygen',
'doxygen' );
80 $this->mwVersion = $this->
getOption(
'version',
'master' );
83 $inputs = explode(
',', $this->
getOption(
'file',
'' ) );
84 foreach ( $inputs as
$input ) {
85 # Doxygen inputs are space separted and double quoted
86 $this->input .=
" \"$IP/$input\"";
93 $this->inputFilter = Shell::escape( [
95 $IP .
'/maintenance/mwdoc-filter.php'
98 $this->
template = $IP .
'/maintenance/Doxyfile';
105 $this->excludePatterns = [];
106 if ( $this->
hasOption(
'no-extensions' ) ) {
107 $this->excludePatterns[] =
'extensions';
111 $this->doMan = $this->
hasOption(
'generate-man' );
119 # Build out directories we want to exclude
121 foreach ( $this->excludes as $item ) {
122 $exclude .=
" $IP/$item";
125 $excludePatterns = implode(
' ', $this->excludePatterns );
129 '{{OUTPUT_DIRECTORY}}' => $this->
output,
130 '{{STRIP_FROM_PATH}}' => $IP,
131 '{{CURRENT_VERSION}}' => $this->mwVersion,
132 '{{INPUT}}' => $this->input,
133 '{{EXCLUDE}}' => $exclude,
134 '{{EXCLUDE_PATTERNS}}' => $excludePatterns,
135 '{{HAVE_DOT}}' => $this->doDot ?
'YES' :
'NO',
136 '{{GENERATE_MAN}}' => $this->doMan ?
'YES' :
'NO',
143 $this->
fatalError(
"Could not write doxygen configuration to file $tmpFile\n" );
146 $command = $this->doxygen .
' ' . $tmpFile;
147 $this->
output(
"Executing command:\n$command\n" );
153---------------------------------------------------
154Doxygen execution finished.
155Check
above for possible errors.
157You might want to
delete the temporary file:
159---------------------------------------------------
164 if ( $exitcode !== 0 ) {
165 $this->
fatalError(
"Something went wrong (exit: $exitcode)\n", $exitcode );
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
this section has the sole purpose of protecting the integrity of the free software distribution system
and give any other recipients of the Program a copy of this License along with the Program You may charge a fee for the physical act of transferring a and you may at your option offer warranty protection in exchange for a fee You may modify your copy or copies of the Program or any portion of thus forming a work based on the and copy and distribute such modifications or work under the terms of Section above
$wgPhpCli
Executable path of the PHP cli binary.
wfTempDir()
Tries to get the system directory for temporary files.
Maintenance script that builds doxygen documentation.
__construct()
Prepare Maintenance class.
getDbType()
Does the script need different DB access? By default, we give Maintenance scripts normal rights to th...
execute()
Do the actual work.
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
const DB_NONE
Constants for DB access type.
output( $out, $channel=null)
Throw some output to the user.
hasOption( $name)
Checks to see if a particular option exists.
addDescription( $text)
Set the description text.
addOption( $name, $description, $required=false, $withArg=false, $shortName=false, $multiOccurrence=false)
Add a parameter to the script.
getOption( $name, $default=null)
Get an option, or return the default.
fatalError( $msg, $exitCode=1)
Output a message and terminate the current script.
require_once RUN_MAINTENANCE_IF_MAIN
if(is_array($mode)) switch( $mode) $input