diff --git a/src/Entity/AddressInterface.php b/src/Entity/AddressInterface.php new file mode 100644 index 0000000..9434c95 --- /dev/null +++ b/src/Entity/AddressInterface.php @@ -0,0 +1,14 @@ +address; + } + + public function setAddress(?string $address): self + { + $this->address = $address; + + return $this; + } + + public function getAdditionalAddress(): ?string + { + return $this->additionalAddress; + } + + public function setAdditionalAddress(?string $additionalAddress): self + { + $this->additionalAddress = $additionalAddress; + + return $this; + } + + public function getPostalCode(): ?string + { + return $this->postalCode; + } + + public function setPostalCode(?string $postalCode): self + { + if (strlen($postalCode) === 4) { + $postalCode = '0' . $postalCode; + } + $this->postalCode = $postalCode; + + return $this; + } + + public function getCity(): ?string + { + return $this->city; + } + + public function setCity(?string $city): self + { + $this->city = $city; + + return $this; + } +} diff --git a/src/Entity/EmailInterface.php b/src/Entity/EmailInterface.php new file mode 100644 index 0000000..4fda2c6 --- /dev/null +++ b/src/Entity/EmailInterface.php @@ -0,0 +1,10 @@ +email; + } + + public function setEmail(?string $email): self + { + $email = strtolower($email); + if ($email === '') { + $email = null; + } + $this->email = $email; + + return $this; + } +} diff --git a/src/Entity/NameableInterface.php b/src/Entity/NameableInterface.php new file mode 100644 index 0000000..a992776 --- /dev/null +++ b/src/Entity/NameableInterface.php @@ -0,0 +1,10 @@ +name; + } + + public function setName(string $name): self + { + $this->name = $name; + + return $this; + } +} diff --git a/src/Entity/OrganizationInterface.php b/src/Entity/OrganizationInterface.php new file mode 100644 index 0000000..eb92f9f --- /dev/null +++ b/src/Entity/OrganizationInterface.php @@ -0,0 +1,12 @@ +id; + } + + public function getOrganizationEmail(): ?string + { + return $this->organizationEmail; + } + + public function setOrganizationEmail(?string $organizationEmail): static + { + $this->organizationEmail = $organizationEmail; + + return $this; + } +} diff --git a/src/Entity/PersonNameableInterface.php b/src/Entity/PersonNameableInterface.php new file mode 100644 index 0000000..c31c11b --- /dev/null +++ b/src/Entity/PersonNameableInterface.php @@ -0,0 +1,18 @@ +getFirstName(), $this->getLastName())); + if ($toReturn === '') { + return null; + } + + return $toReturn; + } + + public function getInitial(): string + { + return sprintf( + '%s%s', + substr(trim($this->getFirstName()), 0, 1), + substr(trim($this->getLastName()), 0, 1) + ); + } + + public function getFirstName(): ?string + { + return $this->firstName; + } + + public function setFirstName(?string $firstName): self + { + $this->firstName = $firstName; + + return $this; + } + + public function getLastName(): ?string + { + return $this->lastName; + } + + public function setLastName(?string $lastName): self + { + $this->lastName = $lastName; + + return $this; + } +} diff --git a/src/Entity/PhoneInterface.php b/src/Entity/PhoneInterface.php new file mode 100644 index 0000000..84e5106 --- /dev/null +++ b/src/Entity/PhoneInterface.php @@ -0,0 +1,10 @@ +phone; + } + + public function setPhone(?string $phone): static + { + $this->phone = $phone; + + return $this; + } +} diff --git a/src/Entity/SirenInterface.php b/src/Entity/SirenInterface.php new file mode 100644 index 0000000..787a841 --- /dev/null +++ b/src/Entity/SirenInterface.php @@ -0,0 +1,10 @@ +siren; + } + + public function setSiren(?string $siren): static + { + $this->siren = $siren; + + return $this; + } +} diff --git a/src/Entity/WebsiteInterface.php b/src/Entity/WebsiteInterface.php new file mode 100644 index 0000000..cf61bb8 --- /dev/null +++ b/src/Entity/WebsiteInterface.php @@ -0,0 +1,10 @@ +website; + } + + public function setWebsite(?string $website): static + { + $this->website = $website; + + return $this; + } +}