diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2018-04-10 11:34:08 +0300 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2018-04-10 11:34:08 +0300 |
commit | 2b53dab10d69c1166e85bfe384f53facd746354c (patch) | |
tree | 918d3fa5646fe550875e135dac06439973d2518c /lib/Model | |
parent | 733b219bce6a8fd3a188184c07744d820adde23e (diff) |
setOption
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Model')
-rw-r--r-- | lib/Model/Index.php | 15 |
1 files changed, 14 insertions, 1 deletions
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 @@ -154,6 +154,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 * * @return $this @@ -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() ]; } |