1 | <?php |
||
35 | class Highlighting implements ParameterBuilder |
||
36 | { |
||
37 | |||
38 | /** |
||
39 | * @var bool |
||
40 | */ |
||
41 | protected $isEnabled = false; |
||
42 | |||
43 | /** |
||
44 | * @var int |
||
45 | */ |
||
46 | protected $fragmentSize = 200; |
||
47 | |||
48 | /** |
||
49 | * @var string |
||
50 | */ |
||
51 | protected $highlightingFieldList = ''; |
||
52 | |||
53 | /** |
||
54 | * @var string |
||
55 | */ |
||
56 | protected $prefix = ''; |
||
57 | |||
58 | /** |
||
59 | * @var string |
||
60 | */ |
||
61 | protected $postfix = ''; |
||
62 | |||
63 | /** |
||
64 | * Highlighting constructor. |
||
65 | * |
||
66 | * private constructor should only be created with the from* methods |
||
67 | * |
||
68 | * @param bool $isEnabled |
||
69 | * @param int $fragmentSize |
||
70 | * @param string $highlightingFieldList |
||
71 | * @param string $prefix |
||
72 | * @param string $postfix |
||
73 | */ |
||
74 | private function __construct($isEnabled = false, $fragmentSize = 200, $highlightingFieldList = '', $prefix = '', $postfix = '') |
||
82 | |||
83 | /** |
||
84 | * @return int |
||
85 | */ |
||
86 | public function getFragmentSize(): int |
||
90 | |||
91 | /** |
||
92 | * @param int $fragmentSize |
||
93 | */ |
||
94 | public function setFragmentSize(int $fragmentSize) |
||
98 | |||
99 | /** |
||
100 | * @return string |
||
101 | */ |
||
102 | public function getHighlightingFieldList(): string |
||
106 | |||
107 | /** |
||
108 | * @param string $highlightingFieldList |
||
109 | */ |
||
110 | public function setHighlightingFieldList(string $highlightingFieldList) |
||
114 | |||
115 | /** |
||
116 | * @return string |
||
117 | */ |
||
118 | public function getPrefix(): string |
||
122 | |||
123 | /** |
||
124 | * @param string $prefix |
||
125 | */ |
||
126 | public function setPrefix(string $prefix) |
||
130 | |||
131 | /** |
||
132 | * @return string |
||
133 | */ |
||
134 | public function getPostfix(): string |
||
138 | |||
139 | /** |
||
140 | * @param string $postfix |
||
141 | */ |
||
142 | public function setPostfix(string $postfix) |
||
146 | |||
147 | /** |
||
148 | * @return boolean |
||
149 | */ |
||
150 | public function getIsEnabled() |
||
154 | |||
155 | /** |
||
156 | * @param boolean $isEnabled |
||
157 | */ |
||
158 | public function setIsEnabled($isEnabled) |
||
162 | |||
163 | /** |
||
164 | * @return array |
||
165 | */ |
||
166 | public function build() |
||
197 | |||
198 | /** |
||
199 | * @param TypoScriptConfiguration $solrConfiguration |
||
200 | * @return Highlighting |
||
201 | */ |
||
202 | public static function fromTypoScriptConfiguration(TypoScriptConfiguration $solrConfiguration) |
||
218 | } |