<?php
namespace Aviatur\CustomerBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="Aviatur\CustomerBundle\Entity\PhonePrefixRepository")
* @ORM\Table(name="phone_prefixes")
*/
class PhonePrefix
{
/**
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(name="id", type="integer")
*/
private $id;
/**
* @ORM\Column(name="country_code", type="string", length=2, unique=true)
*/
private $countryCode;
/**
* @ORM\Column(name="country_name", type="string", length=50)
*/
private $countryName;
/**
* @ORM\Column(name="dial_code", type="string", length=5)
*/
private $dialCode;
/**
* @ORM\Column(name="is_active", type="boolean", options={"default": true})
*/
private $isActive = true;
/**
* @ORM\Column(name="pattern", type="string", length=100, nullable=true)
*/
private $pattern;
/**
* @ORM\Column(name="example", type="string", length=20, nullable=true)
*/
private $example;
// Getters y Setters
public function getId()
{
return $this->id;
}
public function getCountryCode()
{
return $this->countryCode;
}
public function setCountryCode($countryCode)
{
$this->countryCode = $countryCode;
return $this;
}
public function getCountryName()
{
return $this->countryName;
}
public function setCountryName($countryName)
{
$this->countryName = $countryName;
return $this;
}
public function getDialCode()
{
return $this->dialCode;
}
public function setDialCode($dialCode)
{
$this->dialCode = $dialCode;
return $this;
}
public function getIsActive()
{
return $this->isActive;
}
public function setIsActive($isActive)
{
$this->isActive = $isActive;
return $this;
}
public function getPattern()
{
return $this->pattern;
}
public function setPattern($pattern)
{
$this->pattern = $pattern;
return $this;
}
public function getExample()
{
return $this->example;
}
public function setExample($example)
{
$this->example = $example;
return $this;
}
public function getSelectLabel()
{
return sprintf('%s (+%s)', $this->countryName, $this->dialCode);
}
}