WorkerPluginContext
in package
FinalYes
Builder-style configuration context for worker plugins.
Plugins modify this builder in WorkerPluginInterface::configureWorker().
Table of Contents
Properties
- $exceptionInterceptor : ExceptionInterceptorInterface|null
- $interceptors : array<int, Interceptor>
- $taskQueue : string
- $workerOptions : WorkerOptions
Methods
- __construct() : mixed
- addInterceptor() : self
- Add an interceptor to the worker pipeline.
- getExceptionInterceptor() : ExceptionInterceptorInterface|null
- getInterceptors() : array<int, Interceptor>
- getTaskQueue() : string
- getWorkerOptions() : WorkerOptions
- setExceptionInterceptor() : self
- setInterceptors() : self
- setWorkerOptions() : self
Properties
$exceptionInterceptor
private
ExceptionInterceptorInterface|null
$exceptionInterceptor
= null
$interceptors
private
array<int, Interceptor>
$interceptors
= []
$taskQueue read-only
private
string
$taskQueue
$workerOptions
private
WorkerOptions
$workerOptions
Methods
__construct()
public
__construct(string $taskQueue, WorkerOptions $workerOptions[, ExceptionInterceptorInterface|null $exceptionInterceptor = null ]) : mixed
Parameters
- $taskQueue : string
- $workerOptions : WorkerOptions
- $exceptionInterceptor : ExceptionInterceptorInterface|null = null
addInterceptor()
Add an interceptor to the worker pipeline.
public
addInterceptor(Interceptor $interceptor) : self
Parameters
- $interceptor : Interceptor
Return values
selfgetExceptionInterceptor()
public
getExceptionInterceptor() : ExceptionInterceptorInterface|null
Return values
ExceptionInterceptorInterface|nullgetInterceptors()
public
getInterceptors() : array<int, Interceptor>
Return values
array<int, Interceptor>getTaskQueue()
public
getTaskQueue() : string
Return values
stringgetWorkerOptions()
public
getWorkerOptions() : WorkerOptions
Return values
WorkerOptionssetExceptionInterceptor()
public
setExceptionInterceptor(ExceptionInterceptorInterface|null $exceptionInterceptor) : self
Parameters
- $exceptionInterceptor : ExceptionInterceptorInterface|null
Return values
selfsetInterceptors()
public
setInterceptors(array<int, Interceptor> $interceptors) : self
Parameters
- $interceptors : array<int, Interceptor>
Return values
selfsetWorkerOptions()
public
setWorkerOptions(WorkerOptions $workerOptions) : self
Parameters
- $workerOptions : WorkerOptions