Merge pull request #15949 from owncloud/l10n-string-json

Implement json serialize for l10n string
This commit is contained in:
Thomas Müller 2015-04-30 11:11:16 +02:00
commit d308ec4f0e
1 changed files with 9 additions and 1 deletions

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();
}
}