1 | <?php |
||
20 | class Highlight implements BuilderInterface |
||
21 | { |
||
22 | use ParametersTrait; |
||
23 | |||
24 | /** |
||
25 | * @var array Holds fields for highlight. |
||
26 | */ |
||
27 | private $fields = []; |
||
28 | |||
29 | /** |
||
30 | * @var array |
||
31 | */ |
||
32 | private $tags; |
||
33 | |||
34 | /** |
||
35 | * @param string $name Field name to highlight. |
||
36 | * @param array $params |
||
37 | * |
||
38 | * @return $this |
||
39 | */ |
||
40 | public function addField($name, array $params = []) |
||
46 | |||
47 | /** |
||
48 | * Sets html tag and its class used in highlighting. |
||
49 | * |
||
50 | * @param array $preTags |
||
51 | * @param array $postTags |
||
52 | * |
||
53 | * @return $this |
||
54 | */ |
||
55 | public function setTags(array $preTags, array $postTags) |
||
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | public function getType() |
||
70 | |||
71 | /** |
||
72 | * {@inheritdoc} |
||
73 | */ |
||
74 | public function toArray() |
||
90 | } |
||
91 |