src/Aviatur/CustomerBundle/Entity/PhonePrefix.php line 11

Open in your IDE?
  1. <?php
  2. namespace Aviatur\CustomerBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="Aviatur\CustomerBundle\Entity\PhonePrefixRepository")
  6.  * @ORM\Table(name="phone_prefixes")
  7.  */
  8. class PhonePrefix
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue(strategy="AUTO")
  13.      * @ORM\Column(name="id", type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(name="country_code", type="string", length=2, unique=true)
  18.      */
  19.     private $countryCode;
  20.     /**
  21.      * @ORM\Column(name="country_name", type="string", length=50)
  22.      */
  23.     private $countryName;
  24.     /**
  25.      * @ORM\Column(name="dial_code", type="string", length=5)
  26.      */
  27.     private $dialCode;
  28.     /**
  29.      * @ORM\Column(name="is_active", type="boolean", options={"default": true})
  30.      */
  31.     private $isActive true;
  32.     /**
  33.      * @ORM\Column(name="pattern", type="string", length=100, nullable=true)
  34.      */
  35.     private $pattern;
  36.     /**
  37.      * @ORM\Column(name="example", type="string", length=20, nullable=true)
  38.      */
  39.     private $example;
  40.     // Getters y Setters
  41.     public function getId()
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getCountryCode()
  46.     {
  47.         return $this->countryCode;
  48.     }
  49.     public function setCountryCode($countryCode)
  50.     {
  51.         $this->countryCode $countryCode;
  52.         return $this;
  53.     }
  54.     public function getCountryName()
  55.     {
  56.         return $this->countryName;
  57.     }
  58.     public function setCountryName($countryName)
  59.     {
  60.         $this->countryName $countryName;
  61.         return $this;
  62.     }
  63.     public function getDialCode()
  64.     {
  65.         return $this->dialCode;
  66.     }
  67.     public function setDialCode($dialCode)
  68.     {
  69.         $this->dialCode $dialCode;
  70.         return $this;
  71.     }
  72.     public function getIsActive()
  73.     {
  74.         return $this->isActive;
  75.     }
  76.     public function setIsActive($isActive)
  77.     {
  78.         $this->isActive $isActive;
  79.         return $this;
  80.     }
  81.     public function getPattern()
  82.     {
  83.         return $this->pattern;
  84.     }
  85.     public function setPattern($pattern)
  86.     {
  87.         $this->pattern $pattern;
  88.         return $this;
  89.     }
  90.     public function getExample()
  91.     {
  92.         return $this->example;
  93.     }
  94.     public function setExample($example)
  95.     {
  96.         $this->example $example;
  97.         return $this;
  98.     }
  99.     public function getSelectLabel()
  100.     {
  101.         return sprintf('%s (+%s)'$this->countryName$this->dialCode);
  102.     }
  103. }