| @@ 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 | { |
|
| @@ 171-186 (lines=16) @@ | ||
| 168 | return $this->getOnlyStore(); |
|
| 169 | } |
|
| 170 | ||
| 171 | final protected function checkOnyExceptInArray($key, array $options = null) |
|
| 172 | { |
|
| 173 | if ( |
|
| 174 | $options |
|
| 175 | && |
|
| 176 | ( |
|
| 177 | (isset($options['only']) && is_array($options['only']) && !in_array($key, $options['only'])) |
|
| 178 | || |
|
| 179 | (isset($options['except']) && is_array($options['except']) && in_array($key, $options['except'])) |
|
| 180 | ) |
|
| 181 | ) { |
|
| 182 | return false; |
|
| 183 | } |
|
| 184 | ||
| 185 | return true; |
|
| 186 | } |
|
| 187 | ||
| 188 | public function toArray(array $options = null) |
|
| 189 | { |
|