<?php
namespace Cms\DomainBundle\Entity\Embeddables;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\Response;
/**
* Class DomainRedirectionEmbeddable
* @package Cms\DomainBundle\Entity\Embeddables
*
* @ORM\Embeddable
*/
class DomainRedirectionEmbeddable
{
const TYPES__301 = Response::HTTP_MOVED_PERMANENTLY;
const TYPES__302 = Response::HTTP_FOUND;
const TYPES__303 = Response::HTTP_SEE_OTHER;
const TYPES__307 = Response::HTTP_TEMPORARY_REDIRECT;
const TYPES__308 = Response::HTTP_PERMANENTLY_REDIRECT;
const TYPES = array(
self::TYPES__301,
self::TYPES__302,
self::TYPES__303,
self::TYPES__307,
self::TYPES__308,
);
/**
* @var bool
*
* @ORM\Column(
* type = "boolean",
* nullable = false,
* options = {
* "default" = false
* }
* )
*/
protected $enabled = false;
/**
* @var string
*
* @ORM\Column(
* type = "string",
* nullable = true
* )
*/
protected $host = null;
/**
* @var string
*
* @ORM\Column(
* type = "string",
* nullable = true
* )
*/
protected $path = null;
/**
* @var bool
*
* @ORM\Column(
* type = "boolean",
* nullable = true
* )
*/
protected $appendPath = true;
/**
* @var string
*
* @ORM\Column(
* type = "string",
* nullable = true
* )
*/
protected $query = null;
/**
* @var bool
*
* @ORM\Column(
* type = "boolean",
* nullable = true
* )
*/
protected $appendQuery = true;
/**
* @var integer
*
* @ORM\Column(
* type = "integer",
* nullable = false,
* options = {
* "default" = DomainRedirectionEmbeddable::TYPES__302
* }
* )
*/
protected $code = self::TYPES__302;
/**
* @return bool
*/
public function getEnabled()
{
return ($this->enabled === true);
}
/**
* @param bool $value
* @return $this
*/
public function setEnabled($value)
{
$this->enabled = ($value === true);
return $this;
}
/**
* @return bool
*/
public function isEnabled()
{
return ($this->getEnabled() === true);
}
/**
* @return string
*/
public function getHost()
{
return $this->host;
}
/**
* @param string $value
* @return $this
*/
public function setHost($value)
{
$this->host = $value;
return $this;
}
/**
* @return string
*/
public function getPath()
{
return $this->path;
}
/**
* @param string $value
* @return $this
*/
public function setPath($value)
{
$this->path = $value;
return $this;
}
/**
* @return bool
*/
public function getAppendPath()
{
return ($this->appendPath === true);
}
/**
* @param bool $value
* @return $this
*/
public function setAppendPath($value)
{
$this->appendPath = ($value === true);
return $this;
}
/**
* @return string
*/
public function getQuery()
{
return $this->query;
}
/**
* @param string $value
* @return $this
*/
public function setQuery($value)
{
$this->query = $value;
return $this;
}
/**
* @return bool
*/
public function getAppendQuery()
{
return ($this->appendQuery === true);
}
/**
* @param bool $value
* @return $this
*/
public function setAppendQuery($value)
{
$this->appendQuery = ($value === true);
return $this;
}
/**
* @return int
*/
public function getCode()
{
return $this->code;
}
/**
* @param int $value
* @return $this
*/
public function setCode($value)
{
$this->code = $value;
return $this;
}
}