Class yii\queue\cli\SignalLoop
Inheritance | yii\queue\cli\SignalLoop » yii\base\BaseObject |
---|---|
Implements | yii\base\Configurable, yii\queue\cli\LoopInterface |
Available since version | 2.0.2 |
Source Code | https://github.com/yiisoft/yii2-queue/blob/master/cli/SignalLoop.php |
Signal Loop.
Public 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
Property | Type | Description | Defined By |
---|---|---|---|
$queue | yii\queue\cli\Queue | yii\queue\cli\SignalLoop |
Public 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
Of signals to exit from listening of the queue.
Of signals to resume listening of the queue. For example: SIGCONT
Of signals to suspend listening of the queue. For example: SIGTSTP
Method Details
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 |
Checks signals state.
public boolean canContinue ( ) | ||
return | boolean | Whether to continue listening of the queue. |
---|
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 ( ) |