gwis/php-valueobjects

This package is abandoned and no longer maintained. The author suggests using the gws/php-valueobjects package instead.

A collection of useful value objects for PHP

v0.4.0 2016-06-13 23:18 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:26:29 UTC


README

master branch build status

Overview

Wikipedia has a pretty good general explanation of value objects.

  • Vo\DateRange for date ranges
  • Vo\DateTimeRange for date and time ranges
  • Vo\Ip for IPv4 and IPv6 addresses
  • Vo\Mac for MAC addresses
  • Vo\Money for financial math and formatting using the intl extension

Check the tests to get some ideas on how to use these classes.

Documentation

http://gws.github.com/php-valueobjects

Development

There is a Dockerfile in the docker directory which can be used to build a version of PHP with the required extensions in order to run tests. If you have a Dockerized composer, you need to pass the --ignore-platform-reqs option to update, install etc. in order to skip the extension checks.