Custom connector


Definition

The custom plugin allows you to use your own source code in your pipelines, allowing you to connect tools that are not supported by the standard distribution.

Installation

This plugin is already integrated into the Satellite package, so you can’t require it with the composer.

Usage

Unlike other plugins, the configuration is the same whether it is an extractor, a transformer or a loader.

Building an extractor

In the example given, we explain how to configure a custom extractor with the Bar class located in the App\Class namespace.

Here’s a more detailed explanation:

custom:
  extractor:
    use: 'App\Class\Bar' # This line specifies the extractor class you want to use.
    services:
      App\Class\Bar: ~ # Here, we declare the service associated with the Bar class with the syntax App\Class\Bar: ~. This simply indicates that we want to use the default parameters for this service.

For more details about service configurations, please visit the declaring-services documentation.

Building a transformer

In the example given, we explain how to configure a custom extractor with the Bar class located in the App\Class namespace.

Here’s a more detailed explanation:

custom:
  transformer:
    use: 'App\Class\Bar' # This line specifies the extractor class you want to use.
    services:
      App\Class\Bar: # Here, we declare the service associated with the Bar class.
        factory: # This section indicates that the service must be created by calling the extract method of the App\Class\Bar class.
          class: App\Class\Bar
          method: extract
        arguments: # The arguments to be passed to the extract method. In this example, the @foo symbol indicates that the foo service should be injected as an argument. Make sure that the foo service is configured correctly elsewhere in your pipeline.
          - '@foo'
      foo: ~

For more details about service configurations, please visit the declaring-services documentation.

Building a loader

In the example given, we explain how to configure a custom extractor with the Bar class located in the App\Class namespace.

Here’s a more detailed explanation:

custom:
  loader:
    use: 'App\Class\Bar' # This line specifies the extractor class you want to use.
    services:
      App\Class\Bar: # Here, we declare the service associated with the Bar class.
        calls: # This section indicates that specific method calls must be made to the service instance.
          - withUsername: [ 'admin' ] # This means that a method call named withUsername must be made to the instance of the Bar class, with the username "admin" passed as an argument.

For more details about service configurations, please visit the declaring-services documentation.