1 | <?php |
||
24 | class NestedInnerHit implements NamedBuilderInterface |
||
25 | { |
||
26 | use ParametersTrait; |
||
27 | use NameAwareTrait; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $path; |
||
33 | |||
34 | /** |
||
35 | * @var Search |
||
36 | */ |
||
37 | private $search; |
||
38 | |||
39 | /** |
||
40 | * Inner hits container init. |
||
41 | * |
||
42 | * @param string $name |
||
43 | * @param string $path |
||
44 | * @param Search $search |
||
45 | */ |
||
46 | public function __construct($name, $path, Search $search = null) |
||
54 | |||
55 | /** |
||
56 | * @return string |
||
57 | */ |
||
58 | public function getPath() |
||
62 | |||
63 | /** |
||
64 | * @param string $path |
||
65 | * |
||
66 | * @return $this |
||
67 | */ |
||
68 | public function setPath($path) |
||
74 | |||
75 | /** |
||
76 | * @return Search |
||
77 | */ |
||
78 | public function getSearch() |
||
82 | |||
83 | /** |
||
84 | * @param Search $search |
||
85 | * |
||
86 | * @return $this |
||
87 | */ |
||
88 | public function setSearch(Search $search) |
||
94 | |||
95 | /** |
||
96 | * {@inheritdoc} |
||
97 | */ |
||
98 | public function getType() |
||
102 | |||
103 | /** |
||
104 | * {@inheritdoc} |
||
105 | */ |
||
106 | public function toArray() |
||
118 | |||
119 | /** |
||
120 | * Returns 'path' for nested and 'type' for parent inner hits |
||
121 | * |
||
122 | * @return null|string |
||
123 | */ |
||
124 | private function getPathType() |
||
138 | } |
||
139 |