<?php
namespace Fbeen\SettingsBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="fbeen_settings")
*/
class Setting
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @var string
*
* @ORM\Column(name="identifier", type="string", length=32, nullable=false)
*/
private $identifier;
/**
* @var string
*
* @ORM\Column(name="value", type="string", length=255, nullable=true)
*/
private $value;
/**
* @var string
*
* @ORM\Column(name="type", type="string", length=32, nullable=true)
*/
private $type;
/**
* @var boolean
*
* @ORM\Column(name="required", type="boolean", options={"default" : 1})
*/
private $required = true;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set identifier
*
* @param string $identifier
* @return Setting
*/
public function setIdentifier($identifier)
{
$this->identifier = strtolower($identifier);
return $this;
}
/**
* Get identifier
*
* @return string
*/
public function getIdentifier()
{
return $this->identifier;
}
/**
* Set value
*
* @param string $value
* @return Setting
*/
public function setValue($value)
{
$this->value = $value;
return $this;
}
/**
* Get value
*
* @return string
*/
public function getValue()
{
return $this->value;
}
/**
* Set type
*
* @param string $type
* @return Setting
*/
public function setType($type)
{
$this->type = $type;
return $this;
}
/**
* Get type
*
* @return string
*/
public function getType()
{
return strtolower($this->type);
}
/**
* Set required
*
* @param boolean $required
*
* @return Setting
*/
public function setRequired($required)
{
$this->required = $required;
return $this;
}
/**
* Get required
*
* @return boolean
*/
public function getRequired()
{
return $this->required;
}
}