SIGNALS Documentation
API Reference

Transform Registry

Contract for registering column transforms available to import mapping chains, resolved by transform name.

Overview

App\Services\Imports\Transforms\TransformRegistry catalogues the transforms an import mapping chain may apply per column (trim, money-to-minor-units, boolean coercion, …). The 19 core transforms register at boot; plugins add custom transforms through the registrar's importTransform() seam (P6-22).

Public surface

Method Purpose
register() Register one Transform implementation
has() Whether a transform name exists
get() Resolve a transform by name
all() Every registered transform
names() Registered transform names (mapping-chain validation + UI)

Accepted definition shape

Implementations of App\Contracts\Imports\Transform (plugins use TransformContract, which extends it): a unique name(), a configSchema() describing per-mapping options, and apply() over the raw cell value with the row + TransformContext. Transforms are pure per-value functions — chain order is defined per column mapping.

Worked example

use App\Services\Imports\Transforms\TransformRegistry;

$registry = app(TransformRegistry::class);

$registry->register($myCustomTransform);
$chainable = $registry->names();
$value = $registry->get('trim')->apply('  hello ');