From 29a98215835f06236149d209c0e2583164a3a3df Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Sat, 16 Feb 2019 09:40:12 -0100 Subject: Add hasIndex() to OCP\FullTextSearch\Model\IndexDocument Signed-off-by: Maxence Lange Co-Authored-By: daita --- lib/public/FullTextSearch/Model/IndexDocument.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/public/FullTextSearch/Model') 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. -- cgit v1.2.3