DateTime
6 months ago
Number
6 months ago
String
1 month ago
BooleanValueObject.php
6 months ago
Discount.php
6 months ago
DiscountFixedValue.php
2 months ago
DiscountPercentageValue.php
6 months ago
Duration.php
7 years ago
Gender.php
1 year ago
GeoTag.php
7 years ago
Json.php
6 months ago
Picture.php
1 year ago
PositiveDuration.php
7 years ago
Priority.php
6 months ago
Recurring.php
4 years ago
BooleanValueObject.php
40 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @copyright © Melograno Ventures. All rights reserved. |
| 5 | * @licence See LICENCE.md for license details. |
| 6 | */ |
| 7 | |
| 8 | namespace AmeliaBooking\Domain\ValueObjects; |
| 9 | |
| 10 | /** |
| 11 | * Class BooleanValueObject |
| 12 | * |
| 13 | * @package AmeliaBooking\Domain\ValueObjects |
| 14 | */ |
| 15 | final class BooleanValueObject |
| 16 | { |
| 17 | /** |
| 18 | * @var bool |
| 19 | */ |
| 20 | private $value; |
| 21 | |
| 22 | /** |
| 23 | * @param bool $value |
| 24 | */ |
| 25 | public function __construct($value) |
| 26 | { |
| 27 | $this->value = (bool)$value; |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * Return the value from the value object |
| 32 | * |
| 33 | * @return boolean |
| 34 | */ |
| 35 | public function getValue() |
| 36 | { |
| 37 | return $this->value; |
| 38 | } |
| 39 | } |
| 40 |