File tree 1 file changed +35
-0
lines changed
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -127,4 +127,39 @@ public function setFormat($format)
127
127
{
128
128
return $ this ->setParam ('format ' , $ format );
129
129
}
130
+
131
+ /**
132
+ * Set extended bounds option.
133
+ *
134
+ * @param string
135
+ *
136
+ * @return $this
137
+ */
138
+ public function setExtendedBounds ($ min = '' , $ max = '' )
139
+ {
140
+ $ bounds = array ();
141
+ $ bounds ['min ' ] = $ min ;
142
+ $ bounds ['max ' ] = $ max ;
143
+ // switch if min is higher then max
144
+ if (strtotime ($ min ) > strtotime ($ max )) {
145
+ $ bounds ['min ' ] = $ max ;
146
+ $ bounds ['max ' ] = $ min ;
147
+ }
148
+ return $ this ->setParam ('extended_bounds ' , $ bounds );
149
+ }
150
+ /**
151
+ * Set minimal document count option.
152
+ *
153
+ * @param string
154
+ *
155
+ * @return $this
156
+ */
157
+ public function setMinDocCount ($ count = 0 )
158
+ {
159
+ // switch if min is higher then max
160
+ if (is_numeric ($ count )) {
161
+ return $ this ->setParam ('min_doc_count ' , $ count );
162
+ }
163
+ return $ this ;
164
+ }
130
165
}
You can’t perform that action at this time.
0 commit comments