MediaWiki REL1_39
MediaWiki\Shell\CommandFactory Class Reference

Factory facilitating dependency injection for Command. More...

Public Member Functions

 __construct (ShellboxClientFactory $shellboxClientFactory, array $limits, $cgroup, $restrictionMethod)
 
 create ()
 Instantiates a new Command.
 
 createBoxed (?string $service=null)
 Instantiates a new BoxedCommand.
 
 logStderr (bool $yesno=true)
 When enabled, text sent to stderr will be logged with a level of 'error'.
 

Protected Member Functions

 findFirejail ()
 

Detailed Description

Factory facilitating dependency injection for Command.

Since
1.30

Definition at line 35 of file CommandFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Shell\CommandFactory::__construct ( ShellboxClientFactory $shellboxClientFactory,
array $limits,
$cgroup,
$restrictionMethod )
Parameters
ShellboxClientFactory$shellboxClientFactory
array$limitsSee {
See also
Command::limits()}
Parameters
string | bool$cgroupSee {
See also
Command::cgroup()}
Parameters
string | bool$restrictionMethod

Definition at line 69 of file CommandFactory.php.

References MediaWiki\Shell\CommandFactory\findFirejail().

Member Function Documentation

◆ create()

MediaWiki\Shell\CommandFactory::create ( )

Instantiates a new Command.

Returns
Command

Definition at line 139 of file CommandFactory.php.

References $IP.

◆ createBoxed()

MediaWiki\Shell\CommandFactory::createBoxed ( ?string $service = null)

Instantiates a new BoxedCommand.

Parameters
?string$serviceName of Shellbox (as configured in $wgShellboxUrls) that should be used
Returns
BoxedCommand

Definition at line 179 of file CommandFactory.php.

◆ findFirejail()

MediaWiki\Shell\CommandFactory::findFirejail ( )
protected
Returns
bool|string

Definition at line 91 of file CommandFactory.php.

References ExecutableFinder\findInDefaultPaths().

Referenced by MediaWiki\Shell\CommandFactory\__construct().

◆ logStderr()

MediaWiki\Shell\CommandFactory::logStderr ( bool $yesno = true)

When enabled, text sent to stderr will be logged with a level of 'error'.

Parameters
bool$yesno
See also
Command::logStderr

Definition at line 105 of file CommandFactory.php.


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