MediaWiki  master
MediaWiki\JobQueue\JobFactory Class Reference

Public Member Functions

 __construct (ObjectFactory $objectFactory, array $jobObjectSpecs)
 
 newJob (string $command, $params=[])
 Create the appropriate object to handle a specific job. More...
 

Detailed Description

Since
1.40

Definition at line 16 of file JobFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\JobQueue\JobFactory::__construct ( ObjectFactory  $objectFactory,
array  $jobObjectSpecs 
)
Parameters
ObjectFactory$objectFactory
array<array|callable|string>$jobObjectSpecs Object specs, see ObjectFactory

Definition at line 27 of file JobFactory.php.

Member Function Documentation

◆ newJob()

MediaWiki\JobQueue\JobFactory::newJob ( string  $command,
  $params = [] 
)

Create the appropriate object to handle a specific job.

Note
For backwards compatibility with Job::factory, this method also supports an alternative signature:
string $command,
PageReference $page,
array $params
)
newJob(string $command, $params=[])
Create the appropriate object to handle a specific job.
Definition: JobFactory.php:51
Parameters
string$commandJob command
array$paramsJob parameters
Returns
Job
Exceptions
InvalidArgumentException

Definition at line 51 of file JobFactory.php.


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