CustomVariable(Boolean|Null|Number): provide JSON

This commit is contained in:
Thomas Gelf 2016-02-23 10:15:39 +01:00
parent 99608310c5
commit d6d25bd306
3 changed files with 15 additions and 0 deletions

View File

@ -16,6 +16,11 @@ class CustomVariableBoolean extends CustomVariable
return 'json'; return 'json';
} }
public function getDbValue()
{
return json_encode($this->getValue());
}
public function getValue() public function getValue()
{ {
return $this->value; return $this->value;

View File

@ -17,6 +17,11 @@ class CustomVariableNull extends CustomVariable
return null; return null;
} }
public function getDbValue()
{
return json_encode($this->getValue());
}
public function getDbFormat() public function getDbFormat()
{ {
return 'json'; return 'json';

View File

@ -29,6 +29,11 @@ class CustomVariableNumber extends CustomVariable
return 'json'; return 'json';
} }
public function getDbValue()
{
return json_encode($this->getValue());
}
public function getValue() public function getValue()
{ {
return $this->value; return $this->value;