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-01-14 13:09:01 +0300
committerMaxence Lange <maxence@artificial-owl.com>2018-01-14 13:09:01 +0300
commit0ba5499ee6f1a8fa45718549140a8a0547a032ee (patch)
tree1f9f3c379f65d4969278271b092c3db067929172 /lib/Model
parent69947fc9f46ee40912bca36c05f0f428408d54a1 (diff)
save error message on index
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Model')
-rw-r--r--lib/Model/Index.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/Model/Index.php b/lib/Model/Index.php
index 9924871..ca375d0 100644
--- a/lib/Model/Index.php
+++ b/lib/Model/Index.php
@@ -59,6 +59,9 @@ class Index implements \JsonSerializable {
/** @var int */
private $err = 0;
+ /** @var string */
+ private $message;
+
/** @var int */
private $lastIndex = 0;
@@ -146,6 +149,7 @@ class Index implements \JsonSerializable {
$this->status -= $status;
}
+
/**
* @param int $err
*
@@ -164,6 +168,34 @@ class Index implements \JsonSerializable {
return $this->err;
}
+ /**
+ * @return $this
+ */
+ public function incrementError() {
+ $this->err++;
+
+ return $this;
+ }
+
+
+ /**
+ * @return string
+ */
+ public function getMessage() {
+ return $this->message;
+ }
+
+ /**
+ * @param string $message
+ *
+ * @return Index
+ */
+ public function setMessage($message) {
+ $this->message = $message;
+
+ return $this;
+ }
+
/**
* @param int $lastIndex