implement json serialize for l10n string

This commit is contained in:
Bernhard Posselt 2015-04-29 21:22:42 +02:00
parent 002d74f95a
commit 5b857a6eab

View file

@ -24,7 +24,9 @@
*
*/
class OC_L10N_String{
use JsonSerializable;
class OC_L10N_String implements JsonSerializable {
/**
* @var OC_L10N
*/
@ -74,4 +76,10 @@ class OC_L10N_String{
$text = str_replace('%n', $this->count, $text);
return vsprintf($text, $this->parameters);
}
public function jsonSerialize() {
return $this->__toString();
}
}