3 namespace CoreFramework\Criteria\Local;
6 * An interface for local criterias
8 * @author Roland Haeder <webmaster@shipsimu.org>
10 * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
11 * @license GNU GPL 3.0 or any newer version
12 * @link http://www.shipsimu.org
14 * This program is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program. If not, see <http://www.gnu.org/licenses/>.
27 interface LocalSearchCriteria extends Criteria {
31 * @param $limit Search limit
33 * @todo Find a nice casting here. (int) allows until and including 32766.
35 function setLimit ($limit);
38 * "Setter" for limit from a configuration entry
40 * @param $configEntry The configuration entry which hold a number as limit
43 function setConfiguredLimit ($configEntry);
48 * @return $limit Search limit
55 * @param $skip Search skip
57 * @todo Find a nice casting here. (int) allows until and including 32766.
59 function setSkip ($skip);
64 * @return $skip Search skip
69 * Checks whether the given key/value pair is matching with 'default' and one of 'choice' and
70 * never with in 'exclude'.
72 * @param $key Key element to check
73 * @param $value Value to check
74 * @param $separator Separator for "exploding" $value (default: ',')
75 * @return $isMatching Whether the key/value is matching or excluded
77 function isCriteriaMatching ($key, $value, $separator = ',');