Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/fulltextsearch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/Model
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2018-08-03 19:57:06 +0300
committerMaxence Lange <maxence@artificial-owl.com>2018-08-03 19:57:06 +0300
commitf54a649db5a65dc68020ad0afa96582c7863ea9d (patch)
treec0b799c66bc585258f484392132607a667c8262c /lib/Model
parent47fdbb9e974f07d548e5f9e78505117ebf5d89d6 (diff)
serializeable
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Model')
-rw-r--r--lib/Model/IndexOptions.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/Model/IndexOptions.php b/lib/Model/IndexOptions.php
index 6f8e9bc..9b5b269 100644
--- a/lib/Model/IndexOptions.php
+++ b/lib/Model/IndexOptions.php
@@ -27,7 +27,7 @@
namespace OCA\FullTextSearch\Model;
-class IndexOptions {
+class IndexOptions implements \JsonSerializable {
/**
* @var array
@@ -76,4 +76,15 @@ class IndexOptions {
return $default;
}
+ /**
+ * Specify data which should be serialized to JSON
+ *
+ * @link http://php.net/manual/en/jsonserializable.jsonserialize.php
+ * @return mixed data which can be serialized by <b>json_encode</b>,
+ * which is a value of any type other than a resource.
+ * @since 5.4.0
+ */
+ public function jsonSerialize() {
+ return $this->options;
+ }
} \ No newline at end of file