diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2018-08-27 19:03:29 +0300 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2018-08-27 19:03:29 +0300 |
commit | 9cb9dec984021b0be0ac126f9bb80848bedf9160 (patch) | |
tree | 9b9cb9773be4ec84b24f2f94b66c91a0bca49b02 /lib | |
parent | 831aca025bb67f8370e7b53c26126b9bec9914ca (diff) |
adding meta
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Model/SearchRequest.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Model/SearchRequest.php b/lib/Model/SearchRequest.php index 1840191..a349ec2 100644 --- a/lib/Model/SearchRequest.php +++ b/lib/Model/SearchRequest.php @@ -174,7 +174,7 @@ class SearchRequest implements \JsonSerializable { return true; } - $valuedOptions = ['in']; + $valuedOptions = ['in', 'meta']; if (in_array($kw, $valuedOptions)) { $this->addMultipleOption($kw, $value); @@ -263,15 +263,16 @@ class SearchRequest implements \JsonSerializable { /** * @param string $option + * @param string $default * * @return mixed|string */ - public function getOption($option) { + public function getOption($option, $default = '') { if (array_key_exists($option, $this->options)) { return $this->options[$option]; } - return ''; + return $default; } |