https://github.com/myks92/php-value-objects
A set of PHP Value Objects to manage composite values
https://github.com/myks92/php-value-objects
ddd domain-driven-design php php-value-objects php74 value-object value-objects
Last synced: about 1 month ago
JSON representation
A set of PHP Value Objects to manage composite values
- Host: GitHub
- URL: https://github.com/myks92/php-value-objects
- Owner: Myks92
- License: mit
- Created: 2020-03-09T15:13:49.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-29T11:11:45.000Z (almost 5 years ago)
- Last Synced: 2025-03-23T22:13:29.225Z (2 months ago)
- Topics: ddd, domain-driven-design, php, php-value-objects, php74, value-object, value-objects
- Language: PHP
- Size: 114 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# PHP Value Objects
[![Packagist Version][stable]](https://packagist.org/packages/myks92/php-value-objects
) [](https://packagist.org/packages/myks92/php-value-objects
) [](LICENSE.md)
[![PHP Version][badge-php]][php]
[](https://packagist.org/packages/myks92/php-value-objects)
[](https://packagist.org/packages/myks92/php-value-objects)Branch | Travis |
------ | ------ |
master | [![Build Status][badge-travis-unstable]][travis-unstable]A set of PHP Value Objects to manage simple and composite values.
What are Value Objects
Value Objects are PHP [`objects`](http://php.net/manual/en/language.types.object.php) that represent and manage simple or complex values. Once set, the value object cannot
be modified without changing its identity.Simple value objects represent a simple value, like an email. Complex value objects represent complex values, that, in order to really represent a value, need more than one value, like a price that needs an amount and a currency to be understandable and have a sense.
PHP supports several value object e.g.: the [`DateTime`](https://www.php.net/manual/en/class.datetime.php) object and
[`DateTimeImmutable`](https://www.php.net/manual/ru/class.datetimeimmutable.php) object.This library gives support for other kind of values.
## InstallationTo install, use [composer](https://getcomposer.org):
```
composer require myks92/php-value-objects
```## Documentation
All use instructions are located in [documentation][].
## Testing
```
composer test
```## Changelog
Please see [CHANGELOG][] for more information on what has changed recently.
## License
The MIT License (MIT). Please see [LICENSE][] for more information.
[badge-php]: https://img.shields.io/packagist/php-v/Myks92/php-value-objects.svg?style=flat-square
[badge-travis-unstable]: https://travis-ci.org/Myks92/php-value-objects.svg?branch=master[documentation]: https://github.com/Myks92/php-value-objects/blob/master/docs/readme.md
[source]: https://github.com/Myks92/php-value-objects
[stable]: https://poser.pugx.org/myks92/php-value-objects/v/stable.png
[changelog]: https://github.com/Myks92/php-value-objects/blob/master/CHANGELOG.md
[license]: https://github.com/Myks92/php-value-objects/blob/master/LICENSE.md
[php]: https://php.net
[travis-unstable]: https://travis-ci.org/Myks92/php-value-objects