Skip to content

Instantly share code, notes, and snippets.

@doctrinebot
Created December 13, 2015 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doctrinebot/dc77fefe56734b05f2f1 to your computer and use it in GitHub Desktop.
Save doctrinebot/dc77fefe56734b05f2f1 to your computer and use it in GitHub Desktop.
Attachments to Doctrine Jira Issue DBAL-73 - https://github.com/doctrine/dbal/issues/1955
<?php
namespace Application\CoreBundle\Entity;
/**
* @orm:Entity
* @orm:Table(
* indexes={
* @orm:index(name="namespace_idx", columns={"namespace"})
* },
* uniqueConstraints={
* @orm:UniqueConstraint(name="ns_key", columns={"namespace", "key_text"})
* }
* )
*/
class Setting
{
/**
* @var integer $id
*
* @orm:Column(name="id", type="integer")
* @orm:Id
* @orm:GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @orm:Column(name="namespace", type="string")
*/
private $namespace;
/**
* @var string
*
* @orm:Column(name="key_text", type="string")
*/
private $key;
/**
* @var any
*
* @orm:Column(name="value", type="object")
*/
private $value;
public function __construct($namespace = null, $key = null, $value = null)
{
$this->namespace = $namespace;
$this->key = $key;
$this->value = $value;
}
public function getId()
{
return $this->id;
}
public function getNamespace()
{
return $this->namespace;
}
public function setNamespace($namespace)
{
$this->namespace = $namespace;
}
public function getKey()
{
return $this->key;
}
public function setKey($key)
{
$this->key = $key;
}
public function getValue()
{
return $this->value;
}
public function setValue($value)
{
$this->value = $value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment