WorkerStopping.php
TLDR
This file defines the WorkerStopping
class in the Illuminate\Queue\Events
namespace. The class has two properties (status
and workerOptions
) and a constructor method.
Classes
WorkerStopping
The WorkerStopping
class represents an event that is fired when a worker is stopping. It has the following properties:
-
status
: The exit status of the worker (integer). -
workerOptions
: The options of the worker (an instance of\Illuminate\Queue\WorkerOptions
class) passed to the constructor.
The WorkerStopping
class has the following methods:
-
__construct($status = 0, $workerOptions = null)
: The constructor method initializes thestatus
andworkerOptions
properties of theWorkerStopping
class. It takes two optional parameters:-
$status
: The exit status of the worker. Defaults to0
. -
$workerOptions
: The worker options. Defaults tonull
.
-
<?php
namespace Illuminate\Queue\Events;
class WorkerStopping
{
/**
* The worker exit status.
*
* @var int
*/
public $status;
/**
* The worker options.
*
* @var \Illuminate\Queue\WorkerOptions|null
*/
public $workerOptions;
/**
* Create a new event instance.
*
* @param int $status
* @param \Illuminate\Queue\WorkerOptions|null $workerOptions
* @return void
*/
public function __construct($status = 0, $workerOptions = null)
{
$this->status = $status;
$this->workerOptions = $workerOptions;
}
}