@@ 181-191 (lines=11) @@ | ||
178 | * |
|
179 | * @return Array of Statistics. |
|
180 | */ |
|
181 | public function getStatsByTypeCode($typeCode) |
|
182 | { |
|
183 | $stats = array(); |
|
184 | foreach ($this->data as $statistic) { |
|
185 | if ($statistic->category_type->value == $typeCode) { |
|
186 | array_push($stats,$statistic); |
|
187 | } |
|
188 | ||
189 | } |
|
190 | return $stats; |
|
191 | } |
|
192 | ||
193 | /** |
|
194 | * Get Stats by Type Desc. |
|
@@ 278-287 (lines=10) @@ | ||
275 | * |
|
276 | * @return Array of Statistics. |
|
277 | */ |
|
278 | public function searchStatsByTypeCode($typeCode) |
|
279 | { |
|
280 | $stats = array(); |
|
281 | foreach ($this->data as $statistic) { |
|
282 | if (preg_match("/$typeCode/i", $statistic->category_type->value)) { |
|
283 | array_push($stats,$statistic); |
|
284 | } |
|
285 | } |
|
286 | return $stats; |
|
287 | } |
|
288 | ||
289 | /** |
|
290 | * Search Stats by Type Code. |