1: <?php
2:
3: /**
4: *
5: * @package Plugin
6: * @subpackage SearchSolr
7: * @author Marcus Gnaß <marcus.gnass@4fb.de>
8: * @copyright four for business AG
9: * @link http://www.4fb.de
10: */
11:
12: // assert CONTENIDO framework
13: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
14:
15: /**
16: * Abstract class for Solr search implementations.
17: *
18: * @author Marcus Gnaß <marcus.gnass@4fb.de>
19: */
20: abstract class SolrSearcherAbstract {
21:
22: /**
23: * Term to be searched for.
24: *
25: * @var string
26: */
27: protected $_searchTerm = '';
28:
29: /**
30: * Number of search result page to be displayed.
31: * This value is one-based!
32: *
33: * @var int
34: */
35: protected $_page = 1;
36:
37: /**
38: *
39: * @var int
40: */
41: protected $_itemsPerPage = 10;
42:
43: /**
44: *
45: * @param string $searchTerm
46: */
47: public function setSearchTerm($searchTerm) {
48: $this->_searchTerm = $searchTerm;
49: }
50:
51: /**
52: *
53: * @param int $page
54: */
55: public function setPage($page) {
56: $this->_page = $page;
57: }
58:
59: /**
60: *
61: * @param int $itemsPerPage
62: */
63: public function setItemsPerPage($itemsPerPage) {
64: $this->_itemsPerPage = $itemsPerPage;
65: }
66:
67: /**
68: *
69: * @return SolrObject
70: */
71: abstract public function getSearchResults();
72: }
73: