Skip to content

Data Mappings ​

jengo/base includes a high-performance, bidirectional data mapping engine (Jengo\Base\Mapping\Mapper). It enables seamless mapping between arrays, third-party CodeIgniter 4 entities, generic objects/DTOs, and Jengo entities.

On This Section ​

The Problem It Solves ​

Third-party CodeIgniter 4 packages (such as CodeIgniter Shield, Myth:Auth, or custom vendor packages) frequently provide their own Entity classes extending CodeIgniter\Entity\Entity. Because PHP does not support multiple inheritance, application entities cannot extend both the third-party entity and Jengo\Base\Entities\BaseEntity.

With the mapping system, you can define a domain entity extending BaseEntity (with Sqids ID obfuscation, $hidden, $visible, and custom casting), and map the third-party entity or raw array into it with zero friction.

Released under the MIT License.