| @@ 175-184 (lines=10) @@ | ||
| 172 | * |
|
| 173 | * @return Array of statistics. |
|
| 174 | */ |
|
| 175 | public function getStatsByTypeDesc($typeDesc) |
|
| 176 | { |
|
| 177 | $stats = array(); |
|
| 178 | foreach ($this->data as $statistic) { |
|
| 179 | if ($statistic->category_type->desc == $typeDesc) { |
|
| 180 | array_push($stats,$statistic); |
|
| 181 | } |
|
| 182 | } |
|
| 183 | return $stats; |
|
| 184 | } |
|
| 185 | ||
| 186 | /** |
|
| 187 | * Get Stats by Category Code. |
|
| @@ 271-280 (lines=10) @@ | ||
| 268 | * |
|
| 269 | * @return Array of Statistics. |
|
| 270 | */ |
|
| 271 | public function searchStatsByTypeDesc($typeDesc) |
|
| 272 | { |
|
| 273 | $stats = array(); |
|
| 274 | foreach ($this->data as $statistic) { |
|
| 275 | if (preg_match("/$typeDesc/i", $statistic->category_type->desc)) { |
|
| 276 | array_push($stats,$statistic); |
|
| 277 | } |
|
| 278 | } |
|
| 279 | return $stats; |
|
| 280 | } |
|
| 281 | ||
| 282 | /** |
|
| 283 | * Search Stats by Type Code. |
|