Continued:
[core.git] / framework / main / interfaces / criteria / extended / class_LocalSearchCriteria.php
1 <?php
2 // Own namespace
3 namespace Org\Mxchange\CoreFramework\Criteria\Local;
4
5 // Import framework stuff
6 use Org\Mxchange\CoreFramework\Criteria\Criteria;
7
8 /**
9  * An interface for local criterias
10  *
11  * @author              Roland Haeder <webmaster@shipsimu.org>
12  * @version             0.0.0
13  * @copyright   Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
14  * @license             GNU GPL 3.0 or any newer version
15  * @link                http://www.shipsimu.org
16  *
17  * This program is free software: you can redistribute it and/or modify
18  * it under the terms of the GNU General Public License as published by
19  * the Free Software Foundation, either version 3 of the License, or
20  * (at your option) any later version.
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25  * GNU General Public License for more details.
26  *
27  * You should have received a copy of the GNU General Public License
28  * along with this program. If not, see <http://www.gnu.org/licenses/>.
29  */
30 interface LocalSearchCriteria extends Criteria {
31         /**
32          * Setter for limit
33          *
34          * @param       $limit  Search limit
35          * @return      void
36          * @todo        Find a nice casting here. (int) allows until and including 32766.
37          */
38         function setLimit ($limit);
39
40         /**
41          * "Setter" for limit from a configuration entry
42          *
43          * @param       $configEntry    The configuration entry which hold a number as limit
44          * @return      void
45          */
46         function setConfiguredLimit ($configEntry);
47
48         /**
49          * Getter for limit
50          *
51          * @return      $limit  Search limit
52          */
53         function getLimit ();
54
55         /**
56          * Setter for skip
57          *
58          * @param       $skip   Search skip
59          * @return      void
60          * @todo        Find a nice casting here. (int) allows until and including 32766.
61          */
62         function setSkip ($skip);
63
64         /**
65          * Getter for skip
66          *
67          * @return      $skip   Search skip
68          */
69         function getSkip ();
70
71         /**
72          * Checks whether the given key/value pair is matching with 'default' and one of 'choice' and
73          * never with in 'exclude'.
74          *
75          * @param       $key                    Key element to check
76          * @param       $value                  Value to check
77          * @param       $separator              Separator for "exploding" $value (default: ',')
78          * @return      $isMatching             Whether the key/value is matching or excluded
79          */
80         function isCriteriaMatching ($key, $value, $separator = ',');
81
82 }