src/Entity/Pais.php line 17

  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
  5. use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;
  6. /**
  7.  * Pais
  8.  *
  9.  * @ORM\Table(name="pais")
  10.  * @ORM\Entity
  11.  */
  12. class Pais implements TranslatableInterface
  13. {
  14.     use TranslatableTrait;
  15.     
  16.     /**
  17.      * @var integer
  18.      *
  19.      * @ORM\Column(name="id", type="integer")
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @var integer
  26.      *
  27.      * @ORM\Column(name="isonum", type="integer")
  28.      */
  29.     private $isonum;
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(name="iso2", type="string", length=100)
  34.      */
  35.     private $iso2;
  36.     /**
  37.      * @var string
  38.      *
  39.      * @ORM\Column(name="iso3", type="string", length=100)
  40.      */
  41.     private $iso3;
  42.     
  43.     public function __call($method$args)
  44.     {
  45.         //return $this->proxyCurrentLocaleTranslation($method, $arguments);
  46.         if (!method_exists(self::getTranslationEntityClass(), $method)) {
  47.             $method 'get'ucfirst($method);
  48.         }
  49.         return $this->proxyCurrentLocaleTranslation($method$args);        
  50.     }
  51.     
  52.     public function __toString()
  53.     {
  54.         return $this->getNombre();
  55.     }
  56.     /**
  57.      * Get id
  58.      *
  59.      * @return integer 
  60.      */
  61.     public function getId()
  62.     {
  63.         return $this->id;
  64.     }
  65.     /**
  66.      * Set isonum
  67.      *
  68.      * @param integer $isonum
  69.      * @return Pais
  70.      */
  71.     public function setIsonum($isonum)
  72.     {
  73.         $this->isonum $isonum;
  74.         return $this;
  75.     }
  76.     /**
  77.      * Get isonum
  78.      *
  79.      * @return integer 
  80.      */
  81.     public function getIsonum()
  82.     {
  83.         return $this->isonum;
  84.     }
  85.     /**
  86.      * Set iso2
  87.      *
  88.      * @param string $iso2
  89.      * @return Pais
  90.      */
  91.     public function setIso2($iso2)
  92.     {
  93.         $this->iso2 $iso2;
  94.         return $this;
  95.     }
  96.     /**
  97.      * Get iso2
  98.      *
  99.      * @return string 
  100.      */
  101.     public function getIso2()
  102.     {
  103.         return $this->iso2;
  104.     }
  105.     /**
  106.      * Set iso3
  107.      *
  108.      * @param string $iso3
  109.      * @return Pais
  110.      */
  111.     public function setIso3($iso3)
  112.     {
  113.         $this->iso3 $iso3;
  114.         return $this;
  115.     }
  116.     /**
  117.      * Get iso3
  118.      *
  119.      * @return string 
  120.      */
  121.     public function getIso3()
  122.     {
  123.         return $this->iso3;
  124.     }
  125. }