Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/district09/php_package_dg-value
Package containing the interfaces and abstract implementations to support the usage of Value objects in packages and projects.
https://github.com/district09/php_package_dg-value
d09check22 web
Last synced: 3 days ago
JSON representation
Package containing the interfaces and abstract implementations to support the usage of Value objects in packages and projects.
- Host: GitHub
- URL: https://github.com/district09/php_package_dg-value
- Owner: district09
- License: mit
- Created: 2018-10-26T10:45:58.000Z (about 6 years ago)
- Default Branch: develop
- Last Pushed: 2022-08-17T07:51:48.000Z (over 2 years ago)
- Last Synced: 2024-11-05T09:46:45.396Z (about 2 months ago)
- Topics: d09check22, web
- Language: PHP
- Size: 47.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Digipolis - Value objects
Package containing the interfaces and abstract implementations to support the
usage of Value objects in other packages and projects.[![Latest Stable Version][ico-version]][link-packagist]
[![Total Downloads][ico-downloads]][link-packagist]
[![License][ico-license]][link-license][![Build Status][ico-travis]][link-travis]
[![Maintainability][ico-maintainability]][link-maintainability]
[![Test Coverage][ico-test-coverage]][link-test-coverage]
![PHP from Packagist][ico-php-version]## Usage
This package contains the following interfaces:
* `ValueInterface` : the basic interface for all value objects.
* `ValueFromArrayInterface` : extra interface that adds, to a value object, the
static method to create it from an array of data.
* `ValueToArrayInterface` : extra interface that adds, to a value object, the
method to extract its data as an array.
* `CollectonInterface` : the basic interface for a collection of values of the
same type.And the following abstract implementations:
* `ValueAbstract` : Abstract implementation of the `ValueInterface`, implements
only the `sameValueTypeAs()` method.
* `CollectionAbstract` : Abstract implementation of the `CollectonInterface`,
implements the method to compare two collections (`sameValueAs()`) and to get
the collection as an iterator (`getIterator()`).## Install
Install the package:
```bash
composer require digipolisgent/value
```## Change log
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed
recently.## Testing
Run the test suite:
``` bash
vendor/bin/phpunit
```## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more
information.[ico-version]: https://img.shields.io/packagist/v/digipolisgent/value.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/digipolisgent/value.svg?style=flat-square[ico-license]: https://img.shields.io/github/license/district09/php_package_dg-value.svg?style=flat-square
[ico-travis]: https://api.travis-ci.com/district09/php_package_dg-value.svg?branch=master
[ico-maintainability]: https://api.codeclimate.com/v1/badges/316c85fff5a298e6450c/maintainability
[ico-test-coverage]: https://api.codeclimate.com/v1/badges/316c85fff5a298e6450c/test_coverage
[ico-php-version]: https://img.shields.io/packagist/php-v/digipolisgent/value.svg?style=flat-square[link-packagist]: https://packagist.org/packages/digipolisgent/value
[link-license]: LICENSE.md
[link-travis]: https://travis-ci.com/district09/php_package_dg-value
[link-maintainability]: https://codeclimate.com/repos/5bd2f0f01155160cf60025f7/maintainability
[link-test-coverage]: https://codeclimate.com/repos/5bd2f0f01155160cf60025f7/test_coverage