Capacity.php
6 months ago
DateRepeat.php
1 year ago
Id.php
7 years ago
IntegerValue.php
6 months ago
LoginType.php
1 year ago
PositiveInteger.php
6 months ago
Status.php
1 year ago
WholeNumber.php
6 months ago
Id.php
37 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AmeliaBooking\Domain\ValueObjects\Number\Integer; |
| 4 | |
| 5 | /** |
| 6 | * Class Id |
| 7 | * |
| 8 | * @package AmeliaBooking\Domain\ValueObjects\Number\Integer |
| 9 | */ |
| 10 | final class Id |
| 11 | { |
| 12 | /** |
| 13 | * @var int |
| 14 | */ |
| 15 | private $id; |
| 16 | |
| 17 | /** |
| 18 | * Id constructor. |
| 19 | * |
| 20 | * @param int $id |
| 21 | */ |
| 22 | public function __construct($id) |
| 23 | { |
| 24 | $this->id = (int)$id; |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * Return the password from the value object |
| 29 | * |
| 30 | * @return int |
| 31 | */ |
| 32 | public function getValue() |
| 33 | { |
| 34 | return $this->id; |
| 35 | } |
| 36 | } |
| 37 |