@@ 207-216 (lines=10) @@ | ||
204 | * |
|
205 | * @return Array of Statistics. |
|
206 | */ |
|
207 | public function getStatsByCategoryDesc($categoryDesc) |
|
208 | { |
|
209 | $stats = array(); |
|
210 | foreach ($this->data as $statistic) { |
|
211 | if ($statistic->statistic_category->desc == $categoryDesc) { |
|
212 | array_push($stats,$statistic); |
|
213 | } |
|
214 | } |
|
215 | return $stats; |
|
216 | } |
|
217 | ||
218 | /** |
|
219 | * Get Stats by Segment Type. |
|
@@ 303-312 (lines=10) @@ | ||
300 | * |
|
301 | * @return Array of Statistics. |
|
302 | */ |
|
303 | public function searchStatsByCategoryDesc($categoryDesc) |
|
304 | { |
|
305 | $stats = array(); |
|
306 | foreach ($this->data as $statistic) { |
|
307 | if (preg_match("/$categoryDesc/i", $statistic->statistic_category->desc)) { |
|
308 | array_push($stats,$statistic); |
|
309 | } |
|
310 | } |
|
311 | return $stats; |
|
312 | } |
|
313 | ||
314 | } |
|
315 |