Class yii\queue\LogBehavior
Inheritance | yii\queue\LogBehavior » yii\base\Behavior » yii\base\BaseObject |
---|---|
Implements | yii\base\Configurable |
Source Code | https://github.com/yiisoft/yii2-queue/blob/master/LogBehavior.php |
Log Behavior.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$autoFlush | boolean | yii\queue\LogBehavior | |
$owner | yii\queue\Queue | The owner of this behavior | yii\queue\LogBehavior |
Public Methods
Method | Description | Defined By |
---|---|---|
__call() | Calls the named method which is not a class method. | yii\base\BaseObject |
__construct() | Constructor. | yii\base\BaseObject |
__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 |
afterError() | yii\queue\LogBehavior | |
afterExec() | yii\queue\LogBehavior | |
afterPush() | yii\queue\LogBehavior | |
attach() | Attaches the behavior object to the component. | yii\base\Behavior |
beforeExec() | yii\queue\LogBehavior | |
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 |
detach() | Detaches the behavior object from the component. | yii\base\Behavior |
events() | Declares event handlers for the $owner's events. | yii\queue\LogBehavior |
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() | Initializes the object. | yii\base\BaseObject |
workerStart() | yii\queue\LogBehavior | |
workerStop() | yii\queue\LogBehavior |
Protected Methods
Method | Description | Defined By |
---|---|---|
getExecTitle() | yii\queue\LogBehavior | |
getJobTitle() | yii\queue\LogBehavior |
Property Details
The owner of this behavior
Method Details
public void afterError ( yii\queue\ExecEvent $event ) | ||
$event | yii\queue\ExecEvent |
public void afterExec ( yii\queue\ExecEvent $event ) | ||
$event | yii\queue\ExecEvent |
public void afterPush ( yii\queue\PushEvent $event ) | ||
$event | yii\queue\PushEvent |
public void beforeExec ( yii\queue\ExecEvent $event ) | ||
$event | yii\queue\ExecEvent |
Declares event handlers for the $owner's events.
Child classes may override this method to declare what PHP callbacks should be attached to the events of the $owner component.
The callbacks will be attached to the $owner's events when the behavior is attached to the owner; and they will be detached from the events when the behavior is detached from the component.
The callbacks can be any of the following:
- method in this behavior:
'handleClick'
, equivalent to[$this, 'handleClick']
- object method:
[$object, 'handleClick']
- static method:
['Page', 'handleClick']
- anonymous function:
function ($event) { ... }
The following is an example:
[
Model::EVENT_BEFORE_VALIDATE => 'myBeforeValidate',
Model::EVENT_AFTER_VALIDATE => 'myAfterValidate',
]
public array events ( ) | ||
return | array | Events (array keys) and the corresponding event handler methods (array values). |
---|
protected string getExecTitle ( yii\queue\ExecEvent $event ) | ||
$event | yii\queue\ExecEvent |
protected string getJobTitle ( yii\queue\JobEvent $event ) | ||
$event | yii\queue\JobEvent |
public void workerStart ( yii\queue\cli\WorkerEvent $event ) | ||
$event | yii\queue\cli\WorkerEvent |
public void workerStop ( yii\queue\cli\WorkerEvent $event ) | ||
$event | yii\queue\cli\WorkerEvent |