yii\queue\cli\SignalLoop - Yii2 类参考手册

Class yii\queue\cli\SignalLoop

Inheritanceyii\queue\cli\SignalLoop » yii\base\BaseObject
Implementsyii\base\Configurable, yii\queue\cli\LoopInterface
Available since version2.0.2

Class SignalLoop

Public Properties

隐藏继承的属性 Hide inherited properties

属性Property类型 Type简介 Description定义在 Defined By
$exitSignals array Of signals to exit from listening of the queue. yii\queue\cli\SignalLoop
$resumeSignals array Of signals to resume listening of the queue. yii\queue\cli\SignalLoop
$suspendSignals array Of signals to suspend listening of the queue. yii\queue\cli\SignalLoop

Protected Properties

隐藏继承的属性 Hide inherited properties

属性Property类型 Type简介 Description定义在 Defined By
$queue yii\queue\cli\Queue yii\queue\cli\SignalLoop

Public Methods

隐藏继承的方法 Hide inherited methods

方法 Method简介 Description定义在 Defined By
__call() Calls the named method which is not a class method. yii\base\BaseObject
__construct() Constructor. yii\queue\cli\SignalLoop
__get() Returns the value of an object property. yii\base\BaseObject
__isset() Checks if a property is set, i.e. defined and not null. yii\base\BaseObject
__set() Sets value of an object property. yii\base\BaseObject
__unset() Sets an object property to null. yii\base\BaseObject
canContinue() Checks signals state. yii\queue\cli\SignalLoop
canGetProperty() Returns a value indicating whether a property can be read. yii\base\BaseObject
canSetProperty() Returns a value indicating whether a property can be set. yii\base\BaseObject
className() Returns the fully qualified name of this class. yii\base\BaseObject
hasMethod() Returns a value indicating whether a method is defined. yii\base\BaseObject
hasProperty() Returns a value indicating whether a property is defined. yii\base\BaseObject
init() Sets signal handlers. yii\queue\cli\SignalLoop

属性详情 Property Details

$exitSignals public property

Of signals to exit from listening of the queue.

public array $exitSignals = [1521]
$queue protected property
protected yii\queue\cli\Queue $queue null
$resumeSignals public property

Of signals to resume listening of the queue. For example: SIGCONT

public array $resumeSignals = []
$suspendSignals public property

Of signals to suspend listening of the queue. For example: SIGTSTP

public array $suspendSignals = []

方法详情 Method Details

__construct() public method

Constructor.

The default implementation does two things:

  • Initializes the object with the given configuration $config.
  • Call init().

If this method is overridden in a child class, it is recommended that

  • the last parameter of the constructor is a configuration array, like $config here.
  • call the parent implementation at the end of the constructor.
public void __construct ( $queue, array $config = [] )
$queue yii\queue\cli\Queue
$config array

Name-value pairs that will be used to initialize the object properties

canContinue() public method

Checks signals state.

public boolean canContinue ( )
return boolean

Whether to continue listening of the queue.

init() public method

Sets signal handlers.

This method is invoked at the end of the constructor after the object is initialized with the given configuration.

public void init ( )