MediaWiki master
MediaWiki\Installer\Task\AddWikiRestoredServicesProvider Class Reference

Scheduled provider for restored services to be used in maintenance/installPreConfigured.php. More...

Inherits MediaWiki\Installer\Task\Task.

Collaboration diagram for MediaWiki\Installer\Task\AddWikiRestoredServicesProvider:

Public Member Functions

 execute ()
 Execute the task.
 
 getDependencies ()
 Get a list of names or aliases of tasks that must be done prior to this task.
 
 getName ()
 Get the symbolic name of the task.
 
 getProvidedNames ()
 Get a list of names of objects that this task promises to provide via $this->getContext()->provide().
 
- Public Member Functions inherited from MediaWiki\Installer\Task\Task
 getAliases ()
 Get alternative names of this task.
 
 getDescription ()
 Get a human-readable description of what this task does, for use as a progress message.
 
 getDescriptionMessage ()
 Get the description as a Message object.
 
 getHookContainer ()
 Get a HookContainer suitable for calling LoadExtensionSchemaUpdates.
 
 getServices ()
 Get the restored services.
 
 getVirtualDomains ()
 
 initBase (ITaskContext $context, string $schemaBasePath)
 Inject the base class dependencies and configuration.
 
 isPostInstall ()
 If this returns true, the task will be scheduled after tasks for which it returns false.
 
 isSkipped ()
 Override this to return true to skip the task.
 

Additional Inherited Members

- Protected Member Functions inherited from MediaWiki\Installer\Task\Task
 applySourceFile (IMaintainableDatabase $conn, string $relPath)
 Apply a SQL source file to the database as part of running an installation step.
 
 definitelyGetConnection (string $type)
 Get a database connection, and throw if a connection could not be obtained.
 
 getConfigVar (string $name)
 Get a configuration variable for the wiki being created.
 
 getConnection (string $type)
 Connect to the database for a specified purpose.
 
 getContext ()
 Get the execution context.
 
 getDatabaseCreator ()
 Get a helper for creating databases.
 
 getOption (string $name)
 Get an installer option value.
 
 getSchemaBasePath ()
 Get the absolute base path for SQL schema files.
 
 getSqlFilePath (string $filename)
 Return a path to the DBMS-specific SQL file if it exists, otherwise default SQL file.
 

Detailed Description

Scheduled provider for restored services to be used in maintenance/installPreConfigured.php.

It's simpler than RestoredServicesProvider because it just needs to reverse disableStorage(). It needs to use the original LBFactory, not a single injected connection, so that the configured external clusters are accessible.

Access: internal

Definition at line 17 of file AddWikiRestoredServicesProvider.php.

Member Function Documentation

◆ execute()

MediaWiki\Installer\Task\AddWikiRestoredServicesProvider::execute ( )

Execute the task.

Notes for implementors:

  • Unless the task is registered with a specific profile, tasks will run in both installPreConfigured.php and the traditional unconfigured environment. The global state differs between these environments.
  • Tasks almost always have dependencies. Override getDependencies().
  • If you need MediaWikiServices, declare a dependency on 'services' and use getServices(). The dependency ensures that the task is run when the global service container is functional.
Returns
Status

Reimplemented from MediaWiki\Installer\Task\Task.

Definition at line 30 of file AddWikiRestoredServicesProvider.php.

◆ getDependencies()

MediaWiki\Installer\Task\AddWikiRestoredServicesProvider::getDependencies ( )

Get a list of names or aliases of tasks that must be done prior to this task.

Stability: stable
to override
Returns
string|string[]

Reimplemented from MediaWiki\Installer\Task\Task.

Definition at line 22 of file AddWikiRestoredServicesProvider.php.

◆ getName()

MediaWiki\Installer\Task\AddWikiRestoredServicesProvider::getName ( )

Get the symbolic name of the task.

Returns
string

Reimplemented from MediaWiki\Installer\Task\Task.

Definition at line 18 of file AddWikiRestoredServicesProvider.php.

◆ getProvidedNames()

MediaWiki\Installer\Task\AddWikiRestoredServicesProvider::getProvidedNames ( )

Get a list of names of objects that this task promises to provide via $this->getContext()->provide().

If this is non-empty, the task is a scheduled provider, which means that it is not persistently complete after it has been run. If installation is interrupted, it might need to be run again.

Stability: stable
to override
Returns
string|string[]

Reimplemented from MediaWiki\Installer\Task\Task.

Definition at line 26 of file AddWikiRestoredServicesProvider.php.


The documentation for this class was generated from the following file: