MediaWiki master
MediaWiki\Installer\Task\TaskFactory Class Reference

Factory for installer tasks. More...

Public Member Functions

 __construct (ObjectFactory $objectFactory, ITaskContext $context)
 
 create (array $spec)
 Create a task object.
 
 registerExtensionTasks (TaskList $list, string $profile)
 Populate the task list with extension installer tasks provided by the current task context.
 
 registerMainTasks (TaskList $list, string $profile)
 Populate the task list with core installer tasks which are shared by the various installation methods.
 

Public Attributes

const PROFILE_ADD_WIKI = 'installPreConfigured'
 
const PROFILE_INSTALLER = 'installer'
 

Detailed Description

Factory for installer tasks.

Access: internal
For use by the installer

Definition at line 12 of file TaskFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Installer\Task\TaskFactory::__construct ( ObjectFactory $objectFactory,
ITaskContext $context )

Definition at line 48 of file TaskFactory.php.

Member Function Documentation

◆ create()

MediaWiki\Installer\Task\TaskFactory::create ( array $spec)

Create a task object.

Parameters
array$specAssociative array of options. If "callback" is present, then the spec is a callback spec. Otherwise, the spec is an ObjectFactory spec and must contain "class" or "factory".
  • callback: A callable to call when the task is executed
  • name: The task name (callback only)
  • description: The task description (callback only)
  • after: A task or list of tasks that this task must run after (callback only)
  • postInstall: If true, the task will run after all install tasks (callback only)
  • class: The class name (ObjectFactory only)
  • factory: A factory function (ObjectFactory only)
  • args: Arguments to pass to the constructor (ObjectFactory only)
  • schemaBasePath: The base path used for SQL files. This is populated by ExtensionProcessor if the spec comes from an extension.
Returns
Task

Definition at line 117 of file TaskFactory.php.

◆ registerExtensionTasks()

MediaWiki\Installer\Task\TaskFactory::registerExtensionTasks ( TaskList $list,
string $profile )

Populate the task list with extension installer tasks provided by the current task context.

Parameters
TaskList$list
string$profileOne of the PROFILE_xxx constants

Definition at line 71 of file TaskFactory.php.

◆ registerMainTasks()

MediaWiki\Installer\Task\TaskFactory::registerMainTasks ( TaskList $list,
string $profile )

Populate the task list with core installer tasks which are shared by the various installation methods.

Parameters
TaskList$list
string$profileOne of the PROFILE_xxx constants

Definition at line 60 of file TaskFactory.php.

Member Data Documentation

◆ PROFILE_ADD_WIKI

const MediaWiki\Installer\Task\TaskFactory::PROFILE_ADD_WIKI = 'installPreConfigured'

Definition at line 14 of file TaskFactory.php.

◆ PROFILE_INSTALLER

const MediaWiki\Installer\Task\TaskFactory::PROFILE_INSTALLER = 'installer'

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