src/Entity/Locale.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LocaleRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=LocaleRepository::class)
  7.  * @ORM\Table(name="locales")
  8.  */
  9. class Locale
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private ?int $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255)
  19.      */
  20.     private string $name;
  21.     public function getId(): ?int
  22.     {
  23.         return $this->id;
  24.     }
  25.     public function getName(): string
  26.     {
  27.         return $this->name;
  28.     }
  29.     public function setName(string $name): self
  30.     {
  31.         $this->name $name;
  32.         return $this;
  33.     }
  34.     public function getShortName(): string
  35.     {
  36.         return substr($this->getName(), 02);
  37.     }
  38. }