ConnectorAbstract
Base class for any connector. A connector is always paired with an Application that owns its credentials.
use Hanaboso\PipesPhpSdk\Connector\ConnectorAbstract;
Implements #
ConnectorInterface. Uses ConnectorTrait for shared helpers.
Methods you implement #
| Method | Returns | Purpose |
|---|---|---|
getName() | string | Stable internal node identifier. |
processAction(ProcessDto $dto) | ProcessDto | Build the request via the Application, send it, write the response. |
Methods provided #
| Method | Returns | Purpose |
|---|---|---|
getApplication() | ApplicationInterface | The Application this connector is registered against. |
getApplicationInstallFromProcess(ProcessDto $dto) | ApplicationInstall | Load the install for the current process. |
getSender() | CurlManagerInterface | HTTP transport with built-in retry and metric reporting. |
Send pattern #
$response = $this->getSender()->send($requestDto, [200, 201]);
The second argument is the list of HTTP status codes that count as success.
Service tag #
Tag the class as orchesty.node and inject the Application via $application argument in services.yaml.
See also #
- CommonNodeAbstract
- BatchAbstract
- Node.js equivalent:
AConnector