src/Cms/DomainBundle/Entity/Embeddables/DomainRedirectionEmbeddable.php line 14

Open in your IDE?
  1. <?php
  2. namespace Cms\DomainBundle\Entity\Embeddables;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\HttpFoundation\Response;
  5. /**
  6.  * Class DomainRedirectionEmbeddable
  7.  * @package Cms\DomainBundle\Entity\Embeddables
  8.  *
  9.  * @ORM\Embeddable
  10.  */
  11. class DomainRedirectionEmbeddable
  12. {
  13.     const TYPES__301 Response::HTTP_MOVED_PERMANENTLY;
  14.     const TYPES__302 Response::HTTP_FOUND;
  15.     const TYPES__303 Response::HTTP_SEE_OTHER;
  16.     const TYPES__307 Response::HTTP_TEMPORARY_REDIRECT;
  17.     const TYPES__308 Response::HTTP_PERMANENTLY_REDIRECT;
  18.     const TYPES = array(
  19.         self::TYPES__301,
  20.         self::TYPES__302,
  21.         self::TYPES__303,
  22.         self::TYPES__307,
  23.         self::TYPES__308,
  24.     );
  25.     /**
  26.      * @var bool
  27.      *
  28.      * @ORM\Column(
  29.      *     type = "boolean",
  30.      *     nullable = false,
  31.      *     options = {
  32.      *         "default" = false
  33.      *     }
  34.      * )
  35.      */
  36.     protected $enabled false;
  37.     /**
  38.      * @var string
  39.      *
  40.      * @ORM\Column(
  41.      *     type = "string",
  42.      *     nullable = true
  43.      * )
  44.      */
  45.     protected $host null;
  46.     /**
  47.      * @var string
  48.      *
  49.      * @ORM\Column(
  50.      *     type = "string",
  51.      *     nullable = true
  52.      * )
  53.      */
  54.     protected $path null;
  55.     /**
  56.      * @var bool
  57.      *
  58.      * @ORM\Column(
  59.      *     type = "boolean",
  60.      *     nullable = true
  61.      * )
  62.      */
  63.     protected $appendPath true;
  64.     /**
  65.      * @var string
  66.      *
  67.      * @ORM\Column(
  68.      *     type = "string",
  69.      *     nullable = true
  70.      * )
  71.      */
  72.     protected $query null;
  73.     /**
  74.      * @var bool
  75.      *
  76.      * @ORM\Column(
  77.      *     type = "boolean",
  78.      *     nullable = true
  79.      * )
  80.      */
  81.     protected $appendQuery true;
  82.     /**
  83.      * @var integer
  84.      *
  85.      * @ORM\Column(
  86.      *     type = "integer",
  87.      *     nullable = false,
  88.      *     options = {
  89.      *         "default" = DomainRedirectionEmbeddable::TYPES__302
  90.      *     }
  91.      * )
  92.      */
  93.     protected $code self::TYPES__302;
  94.     /**
  95.      * @return bool
  96.      */
  97.     public function getEnabled()
  98.     {
  99.         return ($this->enabled === true);
  100.     }
  101.     /**
  102.      * @param bool $value
  103.      * @return $this
  104.      */
  105.     public function setEnabled($value)
  106.     {
  107.         $this->enabled = ($value === true);
  108.         return $this;
  109.     }
  110.     /**
  111.      * @return bool
  112.      */
  113.     public function isEnabled()
  114.     {
  115.         return ($this->getEnabled() === true);
  116.     }
  117.     /**
  118.      * @return string
  119.      */
  120.     public function getHost()
  121.     {
  122.         return $this->host;
  123.     }
  124.     /**
  125.      * @param string $value
  126.      * @return $this
  127.      */
  128.     public function setHost($value)
  129.     {
  130.         $this->host $value;
  131.         return $this;
  132.     }
  133.     /**
  134.      * @return string
  135.      */
  136.     public function getPath()
  137.     {
  138.         return $this->path;
  139.     }
  140.     /**
  141.      * @param string $value
  142.      * @return $this
  143.      */
  144.     public function setPath($value)
  145.     {
  146.         $this->path $value;
  147.         return $this;
  148.     }
  149.     /**
  150.      * @return bool
  151.      */
  152.     public function getAppendPath()
  153.     {
  154.         return ($this->appendPath === true);
  155.     }
  156.     /**
  157.      * @param bool $value
  158.      * @return $this
  159.      */
  160.     public function setAppendPath($value)
  161.     {
  162.         $this->appendPath = ($value === true);
  163.         return $this;
  164.     }
  165.     /**
  166.      * @return string
  167.      */
  168.     public function getQuery()
  169.     {
  170.         return $this->query;
  171.     }
  172.     /**
  173.      * @param string $value
  174.      * @return $this
  175.      */
  176.     public function setQuery($value)
  177.     {
  178.         $this->query $value;
  179.         return $this;
  180.     }
  181.     /**
  182.      * @return bool
  183.      */
  184.     public function getAppendQuery()
  185.     {
  186.         return ($this->appendQuery === true);
  187.     }
  188.     /**
  189.      * @param bool $value
  190.      * @return $this
  191.      */
  192.     public function setAppendQuery($value)
  193.     {
  194.         $this->appendQuery = ($value === true);
  195.         return $this;
  196.     }
  197.     /**
  198.      * @return int
  199.      */
  200.     public function getCode()
  201.     {
  202.         return $this->code;
  203.     }
  204.     /**
  205.      * @param int $value
  206.      * @return $this
  207.      */
  208.     public function setCode($value)
  209.     {
  210.         $this->code $value;
  211.         return $this;
  212.     }
  213. }