PHPackages                             laxity7/dto - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. laxity7/dto

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

laxity7/dto
===========

An easy-to-use generic DTO package for PHP

v1.1.4(2y ago)021MITPHPPHP &gt;=8.0

Since Aug 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/laxity7/dto)[ Packagist](https://packagist.org/packages/laxity7/dto)[ Docs](https://github.com/laxity7/dto)[ RSS](/packages/laxity7-dto/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (8)Used By (0)

Data Transfer Object
====================

[](#data-transfer-object)

Fast and light Data Transfer Object (DTO) with nested objects and attribute change control, without checking scalar types, use PHP type casting to check them.

[![License](https://camo.githubusercontent.com/efca11703b255d78696482c9886536bbf6d643ad24ec435731d3545825b0b99b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c6178697479372f64746f2e737667)](https://github.com/laxity7/dto/blob/master/LICENSE)[![Latest Stable Version](https://camo.githubusercontent.com/7584600e63c639d918af762db8ae500c536d69af9a2980758bcea2e02c9b2d14/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6178697479372f64746f2e737667)](https://packagist.org/packages/laxity7/dto)[![Total Downloads](https://camo.githubusercontent.com/76e238c203c9edf57f8b06d63abb30ff7097041d466e9119e4d239d1c6492d0a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6178697479372f64746f2e737667)](https://packagist.org/packages/laxity7/dto)

You can control whether the DTO can be mutable, but by default, it is immutable. To be able to change, use public properties or public setters.

This package supports PHP 8.1+

Install
-------

[](#install)

Install via composer

```
composer require laxity7/dto
```

How to use
----------

[](#how-to-use)

```
