1 | <?php |
||
22 | class DateHistogramAggregation extends AbstractAggregation |
||
23 | { |
||
24 | use BucketingTrait; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $interval; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $format; |
||
35 | |||
36 | /** |
||
37 | * Inner aggregations container init. |
||
38 | * |
||
39 | * @param string $name |
||
40 | * @param string $field |
||
41 | * @param string $interval |
||
42 | */ |
||
43 | public function __construct($name, $field = null, $interval = null, $format = null) |
||
51 | |||
52 | /** |
||
53 | * @return int |
||
54 | */ |
||
55 | public function getInterval() |
||
59 | |||
60 | /** |
||
61 | * @param string $interval |
||
62 | * |
||
63 | * @return $this |
||
64 | */ |
||
65 | public function setInterval($interval) |
||
71 | |||
72 | /** |
||
73 | * @param string $format |
||
74 | * |
||
75 | * @return $this |
||
76 | */ |
||
77 | public function setFormat($format) |
||
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | public function getType() |
||
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | */ |
||
95 | public function getArray() |
||
112 | } |
||
113 |