1 | <?php |
||
23 | class ScriptedMetricAggregation extends AbstractAggregation |
||
24 | { |
||
25 | use MetricTrait; |
||
26 | |||
27 | /** |
||
28 | * @var mixed |
||
29 | */ |
||
30 | private $initScript; |
||
31 | |||
32 | /** |
||
33 | * @var mixed |
||
34 | */ |
||
35 | private $mapScript; |
||
36 | |||
37 | /** |
||
38 | * @var mixed |
||
39 | */ |
||
40 | private $combineScript; |
||
41 | |||
42 | /** |
||
43 | * @var mixed |
||
44 | */ |
||
45 | private $reduceScript; |
||
46 | /** |
||
47 | * ScriptedMetricAggregation constructor. |
||
48 | * @param string $name |
||
49 | * @param mixed $initScript |
||
50 | * @param mixed $mapScript |
||
51 | * @param mixed $combineScript |
||
52 | * @param mixed $reduceScript |
||
53 | */ |
||
54 | public function __construct($name, $initScript = null, $mapScript = null, $combineScript = null, $reduceScript = null) |
||
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | */ |
||
67 | public function getType() |
||
71 | |||
72 | /** |
||
73 | * @return mixed |
||
74 | */ |
||
75 | public function getInitScript() |
||
79 | |||
80 | /** |
||
81 | * @param mixed $initScript |
||
82 | */ |
||
83 | public function setInitScript($initScript) |
||
87 | |||
88 | /** |
||
89 | * @return mixed |
||
90 | */ |
||
91 | public function getMapScript() |
||
95 | |||
96 | /** |
||
97 | * @param mixed $mapScript |
||
98 | */ |
||
99 | public function setMapScript($mapScript) |
||
103 | |||
104 | /** |
||
105 | * @return mixed |
||
106 | */ |
||
107 | public function getCombineScript() |
||
111 | |||
112 | /** |
||
113 | * @param mixed $combineScript |
||
114 | */ |
||
115 | public function setCombineScript($combineScript) |
||
119 | |||
120 | /** |
||
121 | * @return mixed |
||
122 | */ |
||
123 | public function getReduceScript() |
||
127 | |||
128 | /** |
||
129 | * @param mixed $reduceScript |
||
130 | */ |
||
131 | public function setReduceScript($reduceScript) |
||
135 | |||
136 | /** |
||
137 | * {@inheritdoc} |
||
138 | */ |
||
139 | public function getArray() |
||
152 | } |
||
153 |