1: <?php
2: /*
3: You may not change or alter any portion of this comment or credits
4: of supporting developers from this source code or any supporting source code
5: which is considered copyrighted (c) material of the original comment or credit authors.
6:
7: This program is distributed in the hope that it will be useful,
8: but WITHOUT ANY WARRANTY; without even the implied warranty of
9: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10: */
11:
12: /**
13: * @copyright 2013-2015 XOOPS Project (http://xoops.org)
14: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
15: * @author trabis <lusopoemas@gmail.com>
16: */
17:
18: interface SearchPluginInterface
19: {
20: /**
21: * search method
22: *
23: * @param string[] $queries search term strings
24: * @param string $andor $queries relation, either 'AND' or 'OR'
25: * @param int $limit maximum number of matches to return
26: * @param int $start offset in full set of matches
27: * @param type $uid user id to limit search
28: *
29: * @return array of items matching criteria
30: * Each item is an associative array with the following keys:
31: * 'title' => result title
32: * 'content' => content preview
33: * 'link' => url to full content
34: * 'time' => unix timestamp of item
35: * 'uid' => associated user id
36: * 'image' => icon to display by result
37: *
38: * @todo the result item should be a defined object
39: */
40: public function search($queries, $andor, $limit, $start, $uid);
41: }
42: