MediaWiki master
MediaWiki\Installer\Task\TaskRunner Class Reference

Public Member Functions

 __construct (TaskList $tasks, TaskFactory $taskFactory, string $profile)
 
 addTaskEndListener (callable $listener)
 Add a callback to be called after each task completes.
 
 addTaskStartListener (callable $listener)
 Add a callback to be called before each task is executed.
 
 dumpTaskList ()
 Provide a summary of the tasks to be executed, for debugging.
 
 execute ()
 Run all non-skipped tasks and return a merged Status.
 
 getCurrentTaskName ()
 Get the name of the last task to start execution.
 
 loadExtensions ()
 Run the extensions provider (if it is registered) and load any extension tasks.
 
 runNamedTask (string $name)
 Run a single specified task (and its scheduled providers)
 
 setSkippedTasks (array $taskNames)
 Set a list of task names to be skipped.
 

Detailed Description

Access: internal
For use by the installer

Definition at line 10 of file TaskRunner.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Installer\Task\TaskRunner::__construct ( TaskList $tasks,
TaskFactory $taskFactory,
string $profile )

Definition at line 28 of file TaskRunner.php.

Member Function Documentation

◆ addTaskEndListener()

MediaWiki\Installer\Task\TaskRunner::addTaskEndListener ( callable $listener)

Add a callback to be called after each task completes.

The callback takes two parameters: the task object and the Status returned by the task.

Definition at line 177 of file TaskRunner.php.

◆ addTaskStartListener()

MediaWiki\Installer\Task\TaskRunner::addTaskStartListener ( callable $listener)

Add a callback to be called before each task is executed.

The callback takes one parameter: the task object.

Definition at line 168 of file TaskRunner.php.

◆ dumpTaskList()

MediaWiki\Installer\Task\TaskRunner::dumpTaskList ( )

Provide a summary of the tasks to be executed, for debugging.

Definition at line 203 of file TaskRunner.php.

◆ execute()

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

Run all non-skipped tasks and return a merged Status.

Returns
Status

Definition at line 39 of file TaskRunner.php.

References MediaWiki\Installer\Task\TaskRunner\loadExtensions().

◆ getCurrentTaskName()

MediaWiki\Installer\Task\TaskRunner::getCurrentTaskName ( )

Get the name of the last task to start execution.

This is valid during callbacks and after execute() returns.

Returns
string|null

Definition at line 196 of file TaskRunner.php.

◆ loadExtensions()

MediaWiki\Installer\Task\TaskRunner::loadExtensions ( )

Run the extensions provider (if it is registered) and load any extension tasks.

Returns
Status

Definition at line 93 of file TaskRunner.php.

Referenced by MediaWiki\Installer\Task\TaskRunner\execute().

◆ runNamedTask()

MediaWiki\Installer\Task\TaskRunner::runNamedTask ( string $name)

Run a single specified task (and its scheduled providers)

Parameters
string$name
Returns
Status

Definition at line 70 of file TaskRunner.php.

◆ setSkippedTasks()

MediaWiki\Installer\Task\TaskRunner::setSkippedTasks ( array $taskNames)

Set a list of task names to be skipped.

Parameters
string[]$taskNames

Definition at line 186 of file TaskRunner.php.


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