gentle / embeddables
Small collection of value objects.
Installs: 3 730
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: ^7.4 || ^8.0
- ext-bcmath: *
Requires (Dev)
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2024-11-05 16:40:19 UTC
README
Small collection of Value Objects to ease composition.
Install
Via Composer
$ composer require gentle/embeddables
Usage
use Gentle\Embeddable\Date; use Gentle\Embeddable\Time; $date = new Date( new Date\Year(2016), new Date\Month(12), new Date\Day(25) ); echo (string)$date; // 2016-12-25 $time = new Time( new Time\Hour(23), new Time\Minute('04'), new Time\Second(14) ); // changing timezone will return a new `Time` object $time = $time->withTimeZone(new \DateTimeZone('Europe/Monaco')); echo (string)$time; // 23:04:14
Testing
$ composer test
Contributing
Please see CONTRIBUTING for details.
Security
For any security related issues, please send an email at alex@gentle.ro instead of using the issue tracker.
License
Licensed under the MIT License - see the LICENSE file for details.