@@ 191-200 (lines=10) @@ | ||
188 | * |
|
189 | * @return Array of Statistics. |
|
190 | */ |
|
191 | public function getStatsByCategoryCode($categoryCode) |
|
192 | { |
|
193 | $stats = array(); |
|
194 | foreach ($this->data as $statistic) { |
|
195 | if ($statistic->statistic_category->value == $categoryCode) { |
|
196 | array_push($stats,$statistic); |
|
197 | } |
|
198 | } |
|
199 | return $stats; |
|
200 | } |
|
201 | ||
202 | /** |
|
203 | * Get Stats by Category Desc. |
|
@@ 287-296 (lines=10) @@ | ||
284 | * |
|
285 | * @return Array of Statistics. |
|
286 | */ |
|
287 | public function searchStatsByCategoryCode($categoryCode) |
|
288 | { |
|
289 | $stats = array(); |
|
290 | foreach ($this->data as $statistic) { |
|
291 | if (preg_match("/$categoryCode/i", $statistic->statistic_category->value)) { |
|
292 | array_push($stats,$statistic); |
|
293 | } |
|
294 | } |
|
295 | return $stats; |
|
296 | } |
|
297 | ||
298 | /** |
|
299 | * Search Stats by Type Code. |