src/Entity/Address.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\IdTrait;
  4. use App\Entity\Traits\TimeStampAbleTrait;
  5. use DateTime;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use App\Repository\AddressRepository;
  8. /**
  9.  * @ORM\Entity(repositoryClass=AddressRepository::class)
  10.  * @ORM\HasLifecycleCallbacks
  11.  */
  12. class Address
  13. {
  14.     use IdTrait;
  15.     use TimeStampAbleTrait;
  16.     /**
  17.      * @ORM\Column(type="string", length=255, nullable=true)
  18.      */
  19.     private ?string $address = null;
  20.     /**
  21.      * @ORM\Column(type="string", length=255, nullable=true)
  22.      */
  23.     private ?string $postCode = null;
  24.     /**
  25.      * @ORM\Column(type="string", length=255, nullable=true)
  26.      */
  27.     private ?string $city = null;
  28.     /**
  29.      * @ORM\Column(type="string", length=255, nullable=true)
  30.      */
  31.     private ?string $country = null;
  32.     public function __clone()
  33.     {
  34.         $this->id = null;
  35.     }
  36.     public function cloneObject(): self
  37.     {
  38.         return clone $this;
  39.     }
  40.     /**
  41.      * @return string|null
  42.      */
  43.     public function getAddress(): ?string
  44.     {
  45.         return $this->address;
  46.     }
  47.     /**
  48.      * @param string|null $address
  49.      */
  50.     public function setAddress(?string $address): self
  51.     {
  52.         $this->address = $address;
  53.         return $this;
  54.     }
  55.     /**
  56.      * @return string|null
  57.      */
  58.     public function getPostCode(): ?string
  59.     {
  60.         return $this->postCode;
  61.     }
  62.     /**
  63.      * @param string|null $postCode
  64.      */
  65.     public function setPostCode(?string $postCode): self
  66.     {
  67.         $this->postCode = $postCode;
  68.         return $this;
  69.     }
  70.     /**
  71.      * @return string|null
  72.      */
  73.     public function getCity(): ?string
  74.     {
  75.         return $this->city;
  76.     }
  77.     /**
  78.      * @param string|null $city
  79.      */
  80.     public function setCity(?string $city): self
  81.     {
  82.         $this->city = $city;
  83.         return $this;
  84.     }
  85.     /**
  86.      * @return string|null
  87.      */
  88.     public function getCountry(): ?string
  89.     {
  90.         return $this->country;
  91.     }
  92.     /**
  93.      * @param string|null $country
  94.      */
  95.     public function setCountry(?string $country): self
  96.     {
  97.         $this->country = $country;
  98.         return $this;
  99.     }
  100. }