MediaWiki REL1_35
MediaWiki\Shell\CommandFactory Class Reference

Factory facilitating dependency injection for Command. More...

Public Member Functions

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

Protected Member Functions

 findFirejail ()
 

Private Attributes

string bool $cgroup
 
bool $doLogStderr = false
 
string bool $firejail
 
array $limits
 
string bool $restrictionMethod
 

Detailed Description

Factory facilitating dependency injection for Command.

Since
1.30

Definition at line 32 of file CommandFactory.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 59 of file CommandFactory.php.

References MediaWiki\Shell\CommandFactory\$cgroup, MediaWiki\Shell\CommandFactory\$limits, MediaWiki\Shell\CommandFactory\$restrictionMethod, and MediaWiki\Shell\CommandFactory\findFirejail().

Member Function Documentation

◆ create()

MediaWiki\Shell\CommandFactory::create ( )

Instantiates a new Command.

Returns
Command

Definition at line 99 of file CommandFactory.php.

References $command.

◆ findFirejail()

MediaWiki\Shell\CommandFactory::findFirejail ( )
protected

◆ 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 90 of file CommandFactory.php.

Member Data Documentation

◆ $cgroup

string bool MediaWiki\Shell\CommandFactory::$cgroup
private

Definition at line 39 of file CommandFactory.php.

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

◆ $doLogStderr

bool MediaWiki\Shell\CommandFactory::$doLogStderr = false
private

Definition at line 42 of file CommandFactory.php.

◆ $firejail

string bool MediaWiki\Shell\CommandFactory::$firejail
private

Definition at line 52 of file CommandFactory.php.

◆ $limits

array MediaWiki\Shell\CommandFactory::$limits
private

Definition at line 36 of file CommandFactory.php.

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

◆ $restrictionMethod

string bool MediaWiki\Shell\CommandFactory::$restrictionMethod
private

Definition at line 47 of file CommandFactory.php.

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


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