infw / size
Size Object for In Framework
Installs: 5 872
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^5.6|^7.0
- infw/range: ^0.0.1
Requires (Dev)
- henrikbjorn/phpspec-code-coverage: ^3.0
- memio/spec-gen: ^0.6
- phpspec/phpspec: ^3.0
This package is auto-updated.
Last update: 2024-10-18 08:43:07 UTC
README
Size is a value object used as a dependency in various packages at "In Framework".
It can be very useful for different tasks like validations or as part of more complex objects.
Installation
composer require infw/size
Usage
<?php use InFw\Size\BaseSizeFactory as SizeFactory; $min = 0; $max = 100; $value = 55; $factory = new SizeFactory($min, $max); /** @var InFw\Size\SizeInterface $size */ $size = $factory->make($value); $size->get(); /** @var \InFw\Range\RangeInterface $range */ $range = $size->getRange();