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