| @@ 186-201 (lines=16) @@ | ||
| 183 | return $this; |
|
| 184 | } |
|
| 185 | ||
| 186 | final protected function checkOnyExceptInArray($key, array $options = null) |
|
| 187 | { |
|
| 188 | if ( |
|
| 189 | $options |
|
| 190 | && |
|
| 191 | ( |
|
| 192 | (isset($options['only']) && is_array($options['only']) && !in_array($key, $options['only'])) |
|
| 193 | || |
|
| 194 | (isset($options['except']) && is_array($options['except']) && in_array($key, $options['except'])) |
|
| 195 | ) |
|
| 196 | ) { |
|
| 197 | return false; |
|
| 198 | } |
|
| 199 | ||
| 200 | return true; |
|
| 201 | } |
|
| 202 | ||
| 203 | public function toArray(array $options = null) |
|
| 204 | { |
|
| @@ 191-206 (lines=16) @@ | ||
| 188 | return $this; |
|
| 189 | } |
|
| 190 | ||
| 191 | final protected function checkOnyExceptInArray($key, array $options = null) |
|
| 192 | { |
|
| 193 | if ( |
|
| 194 | $options |
|
| 195 | && |
|
| 196 | ( |
|
| 197 | (isset($options['only']) && is_array($options['only']) && !in_array($key, $options['only'])) |
|
| 198 | || |
|
| 199 | (isset($options['except']) && is_array($options['except']) && in_array($key, $options['except'])) |
|
| 200 | ) |
|
| 201 | ) { |
|
| 202 | return false; |
|
| 203 | } |
|
| 204 | ||
| 205 | return true; |
|
| 206 | } |
|
| 207 | ||
| 208 | public function toArray(array $options = null) |
|
| 209 | { |
|