| @@ 15-22 (lines=8) @@ | ||
| 12 | * @param array $keys Keys to check |
|
| 13 | * @throw InvalidOptionException |
|
| 14 | */ |
|
| 15 | protected function checkOptionsInt(array $options, array $keys) |
|
| 16 | { |
|
| 17 | foreach ($keys as $intOption) { |
|
| 18 | if (isset($options[$intOption]) && !is_int($options[$intOption])) { |
|
| 19 | throw new InvalidOptionException($this, $options); |
|
| 20 | } |
|
| 21 | } |
|
| 22 | } |
|
| 23 | ||
| 24 | /** |
|
| 25 | * Checks an array so that their keys are strings |
|
| @@ 31-38 (lines=8) @@ | ||
| 28 | * @param array $keys Keys to check |
|
| 29 | * @throw InvalidOptionException |
|
| 30 | */ |
|
| 31 | protected function checkOptionsString(array $options, array $keys) |
|
| 32 | { |
|
| 33 | foreach ($keys as $intOption) { |
|
| 34 | if (isset($options[$intOption]) && !is_string($options[$intOption])) { |
|
| 35 | throw new InvalidOptionException($this, $options); |
|
| 36 | } |
|
| 37 | } |
|
| 38 | } |
|
| 39 | ||
| 40 | /** |
|
| 41 | * Checks an array so that their keys are arrays |
|
| @@ 47-54 (lines=8) @@ | ||
| 44 | * @param array $keys Keys to check |
|
| 45 | * @throw InvalidOptionException |
|
| 46 | */ |
|
| 47 | protected function checkOptionsArray(array $options, array $keys) |
|
| 48 | { |
|
| 49 | foreach ($keys as $intOption) { |
|
| 50 | if (isset($options[$intOption]) && !is_array($options[$intOption])) { |
|
| 51 | throw new InvalidOptionException($this, $options); |
|
| 52 | } |
|
| 53 | } |
|
| 54 | } |
|
| 55 | } |
|