| @@ 165-184 (lines=20) @@ | ||
| 162 | /** |
|
| 163 | * {@inheritdoc} |
|
| 164 | */ |
|
| 165 | public function all(array $criteria = array()) |
|
| 166 | { |
|
| 167 | if (count($criteria) == 0) { |
|
| 168 | return $this->rates; |
|
| 169 | } |
|
| 170 | ||
| 171 | $result = array(); |
|
| 172 | ||
| 173 | /** |
|
| 174 | * @var RateInterface $rate |
|
| 175 | */ |
|
| 176 | foreach ($this->rates as $rate) { |
|
| 177 | ||
| 178 | if (RateFilterUtil::matches($rate, $criteria)) { |
|
| 179 | $result[] = $rate; |
|
| 180 | } |
|
| 181 | } |
|
| 182 | ||
| 183 | return $this->paginate($result, $criteria); |
|
| 184 | } |
|
| 185 | ||
| 186 | /** |
|
| 187 | * {@inheritdoc} |
|
| @@ 122-141 (lines=20) @@ | ||
| 119 | /** |
|
| 120 | * {@inheritdoc} |
|
| 121 | */ |
|
| 122 | public function all(array $criteria = array()) |
|
| 123 | { |
|
| 124 | if (count($criteria) == 0) { |
|
| 125 | return $this->rates; |
|
| 126 | } |
|
| 127 | ||
| 128 | $result = array(); |
|
| 129 | ||
| 130 | /** |
|
| 131 | * @var RateInterface $rate |
|
| 132 | */ |
|
| 133 | foreach ($this->rates as $rate) { |
|
| 134 | ||
| 135 | if (RateFilterUtil::matches($rate, $criteria)) { |
|
| 136 | $result[] = $rate; |
|
| 137 | } |
|
| 138 | } |
|
| 139 | ||
| 140 | return $this->paginate($result, $criteria); |
|
| 141 | } |
|
| 142 | ||
| 143 | /** |
|
| 144 | * {@inheritdoc} |
|