|
MediaWiki REL1_39
|
A runner for maintenance scripts. More...
Public Member Functions | |
| __construct () | |
| Default constructor. | |
| cleanup () | |
| Handler for register_shutdown_function. | |
| defineSettings () | |
| Define how settings are loaded (e.g. | |
| getName () | |
| Returns the maintenance script name. | |
| init (string $scriptClass) | |
| Initialize the runner. | |
| overrideConfig (SettingsBuilder $settingsBuilder) | |
| MW_SETUP_CALLBACK handler, for overriding config. | |
| run () | |
| Run the maintenance script. | |
Static Public Member Functions | |
| static | shouldExecute () |
| Should we execute the maintenance script, or just allow it to be included as a standalone class? It checks that the call stack only includes this function and "requires" (meaning was called from the file scope) | |
Protected Member Functions | |
| addDefaultParams () | |
| Add the default parameters to the scripts. | |
A runner for maintenance scripts.
Definition at line 22 of file MaintenanceRunner.php.
| MediaWiki\Maintenance\MaintenanceRunner::__construct | ( | ) |
Default constructor.
Children should call this first if implementing their own constructors
Definition at line 36 of file MaintenanceRunner.php.
References MediaWiki\Maintenance\MaintenanceRunner\addDefaultParams().
|
protected |
Add the default parameters to the scripts.
Definition at line 44 of file MaintenanceRunner.php.
References Maintenance\GENERIC_MAINTENANCE_PARAMETERS.
Referenced by MediaWiki\Maintenance\MaintenanceRunner\__construct().
| MediaWiki\Maintenance\MaintenanceRunner::cleanup | ( | ) |
Handler for register_shutdown_function.
Definition at line 398 of file MaintenanceRunner.php.
| MediaWiki\Maintenance\MaintenanceRunner::defineSettings | ( | ) |
Define how settings are loaded (e.g.
LocalSettings.php)
Definition at line 180 of file MaintenanceRunner.php.
References $IP, $wgCommandLineMode, and wfDetectLocalSettingsFile().
| MediaWiki\Maintenance\MaintenanceRunner::getName | ( | ) |
Returns the maintenance script name.
Safe to call after init().
Definition at line 136 of file MaintenanceRunner.php.
| MediaWiki\Maintenance\MaintenanceRunner::init | ( | string | $scriptClass | ) |
Initialize the runner.
| string | $scriptClass |
Definition at line 72 of file MaintenanceRunner.php.
References $IP, and $wgCommandLineMode.
| MediaWiki\Maintenance\MaintenanceRunner::overrideConfig | ( | SettingsBuilder | $settingsBuilder | ) |
MW_SETUP_CALLBACK handler, for overriding config.
| SettingsBuilder | $settingsBuilder |
Definition at line 224 of file MaintenanceRunner.php.
References MediaWiki\MainConfigNames\CacheDirectory, Maintenance\DB_NONE, MediaWiki\Settings\SettingsBuilder\getConfig(), MediaWiki\MainConfigNames\LocalisationCacheConf, and MediaWiki\Settings\SettingsBuilder\putConfigValue().
| MediaWiki\Maintenance\MaintenanceRunner::run | ( | ) |
Run the maintenance script.
Definition at line 292 of file MaintenanceRunner.php.
References MediaWiki\MediaWikiServices\disableStorageBackend().
|
static |
Should we execute the maintenance script, or just allow it to be included as a standalone class? It checks that the call stack only includes this function and "requires" (meaning was called from the file scope)
Definition at line 367 of file MaintenanceRunner.php.
References $wgCommandLineMode.