| @@ 174-189 (lines=16) @@ | ||
| 171 | return $this; |
|
| 172 | } |
|
| 173 | ||
| 174 | final protected function checkOnyExceptInArray($key, array $options = null) |
|
| 175 | { |
|
| 176 | if ( |
|
| 177 | $options |
|
| 178 | && |
|
| 179 | ( |
|
| 180 | (isset($options['only']) && is_array($options['only']) && !in_array($key, $options['only'])) |
|
| 181 | || |
|
| 182 | (isset($options['except']) && is_array($options['except']) && in_array($key, $options['except'])) |
|
| 183 | ) |
|
| 184 | ) { |
|
| 185 | return false; |
|
| 186 | } |
|
| 187 | ||
| 188 | return true; |
|
| 189 | } |
|
| 190 | ||
| 191 | public function toArray(array $options = null) |
|
| 192 | { |
|
| @@ 181-196 (lines=16) @@ | ||
| 178 | return $this; |
|
| 179 | } |
|
| 180 | ||
| 181 | final protected function checkOnyExceptInArray($key, array $options = null) |
|
| 182 | { |
|
| 183 | if ( |
|
| 184 | $options |
|
| 185 | && |
|
| 186 | ( |
|
| 187 | (isset($options['only']) && is_array($options['only']) && !in_array($key, $options['only'])) |
|
| 188 | || |
|
| 189 | (isset($options['except']) && is_array($options['except']) && in_array($key, $options['except'])) |
|
| 190 | ) |
|
| 191 | ) { |
|
| 192 | return false; |
|
| 193 | } |
|
| 194 | ||
| 195 | return true; |
|
| 196 | } |
|
| 197 | ||
| 198 | public function toArray(array $options = null) |
|
| 199 | { |
|