Transformer Architecture
Transformer is intentionally minimal.
Execution model
transform() performs a direct collection map:
- receive an input array
- call
TransformerInterface::transform($item)for each item value - return the mapped array with the same ordering and keys
That makes the package easy to reason about in response and view pipelines.
State model
The package itself is stateless.
Any shared context comes from the transformer instance you pass in, and that same object is used for the full mapping call.
Error model
Transformer leaves exception handling with your transformer implementation.
That is a good fit when your application already has its own response, logging, or validation flow around collection shaping.