| @@ 92-98 (lines=7) @@ | ||
| 89 | */ |
|
| 90 | public function get($primaryKey, $secondaryKey) |
|
| 91 | { |
|
| 92 | if (!isset($this->values[$primaryKey][$secondaryKey])) { |
|
| 93 | throw new OutOfBoundsException(sprintf( |
|
| 94 | 'The key ("%s","%s") does not exist.', |
|
| 95 | $primaryKey, |
|
| 96 | $secondaryKey |
|
| 97 | )); |
|
| 98 | } |
|
| 99 | ||
| 100 | return $this->values[$primaryKey][$secondaryKey]; |
|
| 101 | } |
|
| @@ 250-259 (lines=10) @@ | ||
| 247 | */ |
|
| 248 | public function getSecondaryKeys($primaryKey = null) |
|
| 249 | { |
|
| 250 | if ($primaryKey) { |
|
| 251 | if (!isset($this->values[$primaryKey])) { |
|
| 252 | throw new OutOfBoundsException(sprintf( |
|
| 253 | 'The key "%s" does not exist.', |
|
| 254 | $primaryKey |
|
| 255 | )); |
|
| 256 | } |
|
| 257 | ||
| 258 | return array_keys($this->values[$primaryKey]); |
|
| 259 | } |
|
| 260 | ||
| 261 | $allSecondaryKeys = array(); |
|
| 262 | ||