From 2b53dab10d69c1166e85bfe384f53facd746354c Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Tue, 10 Apr 2018 10:34:08 +0200 Subject: setOption Signed-off-by: Maxence Lange --- lib/Model/Index.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'lib/Model') diff --git a/lib/Model/Index.php b/lib/Model/Index.php index 739d4a1..fb3c91a 100644 --- a/lib/Model/Index.php +++ b/lib/Model/Index.php @@ -153,6 +153,18 @@ class Index implements \JsonSerializable { } + /** + * @param string $option + * @param string|int $value + * + * @return $this + */ + public function setOption($option, $value) { + $this->options[$option] = $value; + + return $this; + } + /** * @param array $options * @@ -251,7 +263,8 @@ class Index implements \JsonSerializable { 'providerId' => $this->getProviderId(), 'documentId' => $this->getDocumentId(), 'lastIndex' => $this->getLastIndex(), - 'status' => (int)$this->getStatus() + 'status' => (int)$this->getStatus(), + 'options' => $this->getOptions() ]; } -- cgit v1.2.3