Download the PHP package drewkimberly/php_dtos without Composer
On this page you can find all versions of the php package drewkimberly/php_dtos. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download drewkimberly/php_dtos
More information about drewkimberly/php_dtos
Files in drewkimberly/php_dtos
Package php_dtos
Short Description A simple PHP Data Transfer Object (DTO) library.
License MIT
Informations about the package php_dtos
PHP Data Transfer Objects (DTOs)
A simple PHP DTO library.
Installation:
Usage:
This library aims to make it easy to create Data Transfer Objects (DTOs). DTOs are simple encapsulations of data, independent of application or domain-specific logic. They are serializable objects, making them a clean way to represent data in the transfer layer of an application (i.e. REST API payloads).
The following table highlights the main classes introduced by this library:
Class | Responsibility |
---|---|
\php_dtos\Dto\DtoBase |
Subclass of all DTOs implemented in an application. |
\php_dtos\Dto\DtoCollection |
Represents a DTO collection in an application. In rare cases this class can be subclassed, but the typical usecase should look something like: new DtoCollection(MyDto::class); , where the collection is instantiated with a reference to the underlying (or collected) DTO instance. |
\php_dtos\Json\JsonReader |
Helper class for safely parsing incoming JSON. |
For more information on Data Transfer Objects, see:
- https://martinfowler.com/eaaCatalog/dataTransferObject.html
- https://en.wikipedia.org/wiki/Data_transfer_object
Development
Setup
- Fork this repository
- Clone your forked repository
- From the root of your cloned repository run:
composer install
Testing
TravisCI is used for CI/CD. The following validations are performed against every Pull Request:
Deployment
When a tag is cut, TravisCI will deploy the package to packagist.
Contributing
- Open an Issue on GitHub.
- Open a Pull Request.
- Make sure the TravisCI build is passing for your PR.
- Request a Code Review on your PR.
All versions of php_dtos with dependencies
ext-json Version *