__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace AmeliaBooking\Domain\Entity\User;
use AmeliaBooking\Domain\Collection\Collection;
use AmeliaBooking\Domain\Entity\Stripe\StripeConnect;
use AmeliaBooking\Domain\ValueObjects\Gender;
use AmeliaBooking\Domain\ValueObjects\String\Email;
use AmeliaBooking\Domain\ValueObjects\String\Name;
use AmeliaBooking\Domain\ValueObjects\String\Phone;
/**
* Class Customer
*
* @package AmeliaBooking\Domain\Entity\User
*/
class Customer extends AbstractUser
{
/** @var Gender */
private $gender;
/** @var Collection */
private $stripeConnect;
/**
* @param Name $firstName
* @param Name $lastName
* @param Email $email
* @param Phone $phone
* @param Gender $gender
*/
public function __construct(
Name $firstName,
Name $lastName,
Email $email,
Phone $phone,
Gender $gender
) {
parent::__construct($firstName, $lastName, $email);
$this->phone = $phone;
$this->gender = $gender;
}
/**
* @return Gender
*/
public function getGender()
{
return $this->gender;
}
/**
* @param Gender $gender
*/
public function setGender(Gender $gender)
{
$this->gender = $gender;
}
/**
* Get the user type in a string form
*/
public function getType()
{
return self::USER_ROLE_CUSTOMER;
}
/**
* @return Collection
*/
public function getStripeConnect()
{
return $this->stripeConnect;
}
/**
* @param Collection $stripeConnect
*/
public function setStripeConnect($stripeConnect)
{
$this->stripeConnect = $stripeConnect;
}
/**
* @return array
*/
public function toArray()
{
return array_merge(
parent::toArray(),
[
'phone' => $this->getPhone()->getValue(),
'gender' => $this->getGender()->getValue(),
'stripeConnect' => $this->getStripeConnect() ? $this->getStripeConnect()->toArray() : null,
]
);
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| AbstractUser.php | File | 8.87 KB | 0640 |
|
| Admin.php | File | 298 B | 0640 |
|
| AppleCalendarEmployeeConnect.php | File | 1.08 KB | 0640 |
|
| Customer.php | File | 2.11 KB | 0640 |
|
| Manager.php | File | 304 B | 0640 |
|
| Provider.php | File | 8.12 KB | 0640 |
|