Last active
March 2, 2022 10:34
-
-
Save dvesh3/ee88f6a7b75ea65f9f1db981b682e7cd to your computer and use it in GitHub Desktop.
Trait for Customer class required Getters/Setters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Model\CustomerManagementFramework; | |
trait CustomerAttributesTrait | |
{ | |
protected ?bool $active; | |
protected ?string $gender; | |
protected ?string $firstname; | |
protected ?string $lastname; | |
protected ?string $email; | |
protected ?string $street; | |
protected ?string $zip; | |
protected ?string $city; | |
protected ?string $countryCode; | |
protected ?string $phone; | |
/** | |
* @return bool|null | |
*/ | |
public function getActive(): ?bool | |
{ | |
return $this->active; | |
} | |
/** | |
* @param bool|null $active | |
*/ | |
public function setActive(?bool $active): void | |
{ | |
$this->active = $active; | |
} | |
/** | |
* @return string|null | |
*/ | |
public function getGender(): ?string | |
{ | |
return $this->gender; | |
} | |
/** | |
* @param string|null $gender | |
*/ | |
public function setGender(?string $gender): void | |
{ | |
$this->gender = $gender; | |
} | |
/** | |
* @return string|null | |
*/ | |
public function getFirstname(): ?string | |
{ | |
return $this->firstname; | |
} | |
/** | |
* @param string|null $firstname | |
*/ | |
public function setFirstname(?string $firstname): void | |
{ | |
$this->firstname = $firstname; | |
} | |
/** | |
* @return string|null | |
*/ | |
public function getLastname(): ?string | |
{ | |
return $this->lastname; | |
} | |
/** | |
* @param string|null $lastname | |
*/ | |
public function setLastname(?string $lastname): void | |
{ | |
$this->lastname = $lastname; | |
} | |
/** | |
* @return string|null | |
*/ | |
public function getEmail(): ?string | |
{ | |
return $this->email; | |
} | |
/** | |
* @param string|null $email | |
*/ | |
public function setEmail(?string $email): void | |
{ | |
$this->email = $email; | |
} | |
/** | |
* @return string|null | |
*/ | |
public function getStreet(): ?string | |
{ | |
return $this->street; | |
} | |
/** | |
* @param string|null $street | |
*/ | |
public function setStreet(?string $street): void | |
{ | |
$this->street = $street; | |
} | |
/** | |
* @return string|null | |
*/ | |
public function getZip(): ?string | |
{ | |
return $this->zip; | |
} | |
/** | |
* @param string|null $zip | |
*/ | |
public function setZip(?string $zip): void | |
{ | |
$this->zip = $zip; | |
} | |
/** | |
* @return string|null | |
*/ | |
public function getCity(): ?string | |
{ | |
return $this->city; | |
} | |
/** | |
* @param string|null $city | |
*/ | |
public function setCity(?string $city): void | |
{ | |
$this->city = $city; | |
} | |
/** | |
* @return string|null | |
*/ | |
public function getCountryCode(): ?string | |
{ | |
return $this->countryCode; | |
} | |
/** | |
* @param string|null $countryCode | |
*/ | |
public function setCountryCode(?string $countryCode): void | |
{ | |
$this->countryCode = $countryCode; | |
} | |
/** | |
* @return string|null | |
*/ | |
public function getPhone(): ?string | |
{ | |
return $this->phone; | |
} | |
/** | |
* @param string|null $phone | |
*/ | |
public function setPhone(?string $phone): void | |
{ | |
$this->phone = $phone; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment