MediaWiki  REL1_24
commandLine.inc
Go to the documentation of this file.
00001 <?php
00024 require_once __DIR__ . '/Maintenance.php';
00025 
00026 // @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
00027 global $optionsWithArgs;
00028 // @codingStandardsIgnoreEnd
00029 if ( !isset( $optionsWithArgs ) ) {
00030     $optionsWithArgs = array();
00031 }
00032 
00033 class CommandLineInc extends Maintenance {
00034     public function __construct() {
00035         // @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
00036         global $optionsWithArgs;
00037         // @codingStandardsIgnoreEnd
00038         parent::__construct();
00039         foreach ( $optionsWithArgs as $name ) {
00040             $this->addOption( $name, '', false, true );
00041         }
00042     }
00043 
00048     protected function maybeHelp( $force = false ) {
00049         if ( !$force ) {
00050             return;
00051         }
00052         parent::maybeHelp( true );
00053     }
00054 
00055     public function execute() {
00056         // @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
00057         global $args, $options;
00058         // @codingStandardsIgnoreEnd
00059         $args = $this->mArgs;
00060         $options = $this->mOptions;
00061     }
00062 }
00063 
00064 $maintClass = 'CommandLineInc';
00065 require RUN_MAINTENANCE_IF_MAIN;
00066