MediaWiki  1.34.0
MediaWiki\Shell\CommandFactory Class Reference

Factory facilitating dependency injection for Command. More...

Public Member Functions

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

Private 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 
)

Constructor.

Parameters
array$limitsSee {
See also
Command::limits()}
Parameters
string | bool$cgroupSee {
See also
Command::cgroup()}
Parameters
string | bool$restrictionMethod

Definition at line 61 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 ( )

◆ findFirejail()

MediaWiki\Shell\CommandFactory::findFirejail ( )
private

◆ logStderr()

MediaWiki\Shell\CommandFactory::logStderr (   $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 91 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.

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

◆ $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: