This PR adds a new core adapter: TransformingAdapter, allowing users to transform data from the inner adapter passed in constructor.
This is very useful when presenting the data from database as DTOs in the Pagerfanta instance.
The transforming callback accepts both current item and key as parameters and return the transformed object.
PHPStan annotations ensure type safety on all stages.
This PR adds a new core adapter:
TransformingAdapter
, allowing users to transform data from the inner adapter passed in constructor.This is very useful when presenting the data from database as DTOs in the Pagerfanta instance.
The transforming callback accepts both current item and key as parameters and return the transformed object. PHPStan annotations ensure type safety on all stages.