Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- declare(strict_types=1);
- namespace App\Sitter\Domain\ValueObject;
- final class Sitter
- {
- private $id;
- private $status;
- private $firstname;
- private $lastname;
- private $email;
- private $phone;
- private $second_phone;
- private $city;
- public function __construct(
- int $id,
- string $status,
- ?string $firstname,
- ?string $lastname,
- ?string $email,
- ?string $phone,
- ?string $second_phone,
- ?string $city
- ) {
- $this->id = $id;
- $this->status = $status;
- $this->firstname = $firstname;
- $this->lastname = $lastname;
- $this->email = $email;
- $this->phone = $phone;
- $this->second_phone = $second_phone;
- $this->city = $city;
- }
- public function getId(): int
- {
- return $this->id;
- }
- public function getStatus(): string
- {
- return $this->status;
- }
- public function getFirstName(): ?string
- {
- return $this->firstname;
- }
- public function getLastName(): ?string
- {
- return $this->lastname;
- }
- public function getEmail(): ?string
- {
- return $this->email;
- }
- public function getPhone(): ?string
- {
- return $this->phone;
- }
- public function getSecondPhone(): ?string
- {
- return $this->second_phone;
- }
- public function getCity(): ?string
- {
- return $this->city;
- }
- public function toArray()
- {
- return [
- 'id' => $this->getId(),
- 'status' => $this->getStatus(),
- 'firstname' => $this->getFirstName(),
- 'lastname' => $this->getLastName(),
- 'email' => $this->getEmail(),
- 'phone' => $this->getPhone(),
- 'second_phone' => $this->getSecondPhone(),
- 'city' => $this->getCity(),
- ];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement