WorkerPluginTrait
No-op defaults for {@see WorkerPluginInterface}.
Tags
Table of Contents
Methods
- configureWorker() : void
- configureWorkerFactory() : void
- initializeWorker() : void
- run() : int
- runWorker() : PromiseInterface
Methods
configureWorker()
public
configureWorker(WorkerPluginContext $context, callable $next) : void
Parameters
- $context : WorkerPluginContext
- $next : callable
configureWorkerFactory()
public
configureWorkerFactory(WorkerFactoryPluginContext $context, callable $next) : void
Parameters
- $context : WorkerFactoryPluginContext
- $next : callable
initializeWorker()
public
initializeWorker(WorkerInterface $worker, callable $next) : void
Parameters
- $worker : WorkerInterface
- $next : callable
run()
public
run(WorkerFactoryInterface $factory, callable $next) : int
Parameters
- $factory : WorkerFactoryInterface
- $next : callable
Return values
intrunWorker()
public
runWorker(callable $handler, ServerRequestInterface $request, array<string|int, mixed> $headers, callable $next) : PromiseInterface
Parameters
- $handler : callable
- $request : ServerRequestInterface
- $headers : array<string|int, mixed>
- $next : callable