AbstractPlugin
in package
implements
TemporalPluginInterface
uses
ConnectionPluginTrait, ClientPluginTrait, ScheduleClientPluginTrait, WorkerPluginTrait
AbstractYes
Abstract base class providing no-op defaults for all plugin methods.
Plugin authors can extend this and override only what they need.
Table of Contents
Interfaces
- TemporalPluginInterface
- Combined plugin interface for bundles that configure connection, client, schedule client, and worker.
Properties
- $name : string
Methods
- __construct() : mixed
- configureClient() : void
- configureScheduleClient() : void
- configureServiceClient() : ServiceClientInterface
- configureWorker() : void
- configureWorkerFactory() : void
- getName() : string
- Unique name identifying this plugin (e.g., "my-org.tracing").
- initializeWorker() : void
- run() : int
- runWorker() : PromiseInterface
Properties
$name read-only
private
string
$name
Methods
__construct()
public
__construct(string $name) : mixed
Parameters
- $name : string
configureClient()
public
configureClient(ClientPluginContext $context, callable $next) : void
Parameters
- $context : ClientPluginContext
- $next : callable
configureScheduleClient()
public
configureScheduleClient(ScheduleClientPluginContext $context, callable $next) : void
Parameters
- $context : ScheduleClientPluginContext
- $next : callable
configureServiceClient()
public
configureServiceClient(ServiceClientInterface $serviceClient, callable $next) : ServiceClientInterface
Parameters
- $serviceClient : ServiceClientInterface
- $next : callable
Return values
ServiceClientInterfaceconfigureWorker()
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
getName()
Unique name identifying this plugin (e.g., "my-org.tracing").
public
getName() : string
Used for deduplication and diagnostics.
Return values
stringinitializeWorker()
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