bowlofsoup/cake-dto-mapper

Map a CakePHP entity into a DTO

1.0.0 2023-08-30 08:51 UTC

This package is auto-updated.

Last update: 2024-05-30 00:42:14 UTC


README

Minimum PHP Version

Installation

composer require bowlofsoup/cake-dto-mapper

Quick overview

Has two main functionalities:

(1) Converts a CakePHP entity into a DTO; EntityToDtoMapper.

Since CakePHP, by default, does not have actual properties on an entity, an interface must be implemented on the entity to ensure that $this->_properties is used.

(2) Converts an associative array into a DTO; ArrayToDtoMapper.