Continued:
[core.git] / inc / main / interfaces / criteria / extended / class_LocalSearchCriteria.php
1 <?php
2 // Own namespace
3 namespace CoreFramework\Criteria\Local;
4
5 /**
6  * An interface for local criterias
7  *
8  * @author              Roland Haeder <webmaster@shipsimu.org>
9  * @version             0.0.0
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
13  *
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.
18  *
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.
23  *
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/>.
26  */
27 interface LocalSearchCriteria extends Criteria {
28         /**
29          * Setter for limit
30          *
31          * @param       $limit  Search limit
32          * @return      void
33          * @todo        Find a nice casting here. (int) allows until and including 32766.
34          */
35         function setLimit ($limit);
36
37         /**
38          * "Setter" for limit from a configuration entry
39          *
40          * @param       $configEntry    The configuration entry which hold a number as limit
41          * @return      void
42          */
43         function setConfiguredLimit ($configEntry);
44
45         /**
46          * Getter for limit
47          *
48          * @return      $limit  Search limit
49          */
50         function getLimit ();
51
52         /**
53          * Setter for skip
54          *
55          * @param       $skip   Search skip
56          * @return      void
57          * @todo        Find a nice casting here. (int) allows until and including 32766.
58          */
59         function setSkip ($skip);
60
61         /**
62          * Getter for skip
63          *
64          * @return      $skip   Search skip
65          */
66         function getSkip ();
67
68         /**
69          * Checks whether the given key/value pair is matching with 'default' and one of 'choice' and
70          * never with in 'exclude'.
71          *
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
76          */
77         function isCriteriaMatching ($key, $value, $separator = ',');
78
79 }