1 | <?php |
||
11 | class Stats |
||
12 | { |
||
13 | private $stats; |
||
14 | |||
15 | 29 | public function __construct() |
|
19 | |||
20 | /** |
||
21 | * 任意のStats設定 |
||
22 | * |
||
23 | * @param string $stats |
||
24 | * @return \Kwkm\MkLiveStatusClient\Stats |
||
25 | * @throw \InvalidArgumentException if the provided argument is not of type 'string'. |
||
26 | */ |
||
27 | 12 | public function set($stats) |
|
33 | |||
34 | /** |
||
35 | * column = value のStats設定 |
||
36 | * |
||
37 | * @param string $column カラム名 |
||
38 | * @param string $value Statsする値 |
||
39 | * @return \Kwkm\MkLiveStatusClient\Stats |
||
40 | */ |
||
41 | 8 | public function equal($column, $value) |
|
47 | |||
48 | /** |
||
49 | * column != value のStats設定 |
||
50 | * |
||
51 | * @param string $column カラム名 |
||
52 | * @param string $value Statsする値 |
||
53 | * @return \Kwkm\MkLiveStatusClient\Stats |
||
54 | */ |
||
55 | 3 | public function notEqual($column, $value) |
|
61 | |||
62 | /** |
||
63 | * 合計値の集計 |
||
64 | * @param string $column カラム名 |
||
65 | * @return \Kwkm\MkLiveStatusClient\Stats |
||
66 | */ |
||
67 | 1 | public function sum($column) |
|
73 | |||
74 | /** |
||
75 | * 最小値の集計 |
||
76 | * @param string $column カラム名 |
||
77 | * @return \Kwkm\MkLiveStatusClient\Stats |
||
78 | */ |
||
79 | 3 | public function min($column) |
|
85 | |||
86 | /** |
||
87 | * 最大値の集計 |
||
88 | * @param string $column カラム名 |
||
89 | * @return \Kwkm\MkLiveStatusClient\Stats |
||
90 | */ |
||
91 | 3 | public function max($column) |
|
97 | |||
98 | /** |
||
99 | * 平均値の集計 |
||
100 | * @param string $column カラム名 |
||
101 | * @return \Kwkm\MkLiveStatusClient\Stats |
||
102 | */ |
||
103 | 3 | public function avg($column) |
|
109 | |||
110 | /** |
||
111 | * 標準偏差の集計 |
||
112 | * @param string $column カラム名 |
||
113 | * @return \Kwkm\MkLiveStatusClient\Stats |
||
114 | */ |
||
115 | 1 | public function std($column) |
|
121 | |||
122 | /** |
||
123 | * 合計値の逆数の集計 |
||
124 | * @param string $column カラム名 |
||
125 | * @return \Kwkm\MkLiveStatusClient\Stats |
||
126 | */ |
||
127 | 1 | public function suminv($column) |
|
133 | |||
134 | /** |
||
135 | * 平均値の逆数の集計 |
||
136 | * @param string $column カラム名 |
||
137 | * @return \Kwkm\MkLiveStatusClient\Stats |
||
138 | */ |
||
139 | 1 | public function avginv($column) |
|
145 | |||
146 | /** |
||
147 | * StatsAnd の指定 |
||
148 | * @param integer $and |
||
149 | * @return \Kwkm\MkLiveStatusClient\Stats |
||
150 | * @throw \InvalidArgumentException if the provided argument is not of type 'integer'. |
||
151 | */ |
||
152 | 3 | public function operatorAnd($and) |
|
158 | |||
159 | /** |
||
160 | * StatsOr の指定 |
||
161 | * @param integer $or |
||
162 | * @return \Kwkm\MkLiveStatusClient\Stats |
||
163 | * @throw \InvalidArgumentException if the provided argument is not of type 'integer'. |
||
164 | */ |
||
165 | 1 | public function operatorOr($or) |
|
171 | |||
172 | /** |
||
173 | * StatsNegate の指定 |
||
174 | * @return \Kwkm\MkLiveStatusClient\Stats |
||
175 | * @throw \InvalidArgumentException if the provided argument is not of type 'integer'. |
||
176 | */ |
||
177 | 1 | public function negate() |
|
183 | |||
184 | /** |
||
185 | * Statsのリセット |
||
186 | * @return $this |
||
187 | */ |
||
188 | 29 | public function reset() |
|
194 | |||
195 | /** |
||
196 | * Get Stats |
||
197 | * @return array |
||
198 | */ |
||
199 | 12 | public function get() |
|
203 | } |
||
204 |