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

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-02-16 13:40:12 +0300
committerMorris Jobke <hey@morrisjobke.de>2019-02-19 13:05:50 +0300
commit29a98215835f06236149d209c0e2583164a3a3df (patch)
tree9d6e2324674cc983540492c74f076053951bbd6e
parente20292f174469fa4ab17a09cc63c2395ca60ee53 (diff)
Add hasIndex() to OCP\FullTextSearch\Model\IndexDocument
Signed-off-by: Maxence Lange <maxence@artificial-owl.com> Co-Authored-By: daita <maxence@artificial-owl.com>
-rw-r--r--lib/public/FullTextSearch/Model/IndexDocument.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/public/FullTextSearch/Model/IndexDocument.php b/lib/public/FullTextSearch/Model/IndexDocument.php
index 78679ac6225..d00a8461ee8 100644
--- a/lib/public/FullTextSearch/Model/IndexDocument.php
+++ b/lib/public/FullTextSearch/Model/IndexDocument.php
@@ -183,6 +183,17 @@ class IndexDocument implements JsonSerializable {
return $this->index;
}
+ /**
+ * return if Index is defined.
+ *
+ * @since 16.0.0
+ *
+ * @return bool
+ */
+ final public function hasIndex(): bool {
+ return $this->index !== null;
+ }
+
/**
* Set the modified time of the original document.