| @@ 74-89 (lines=16) @@ | ||
| 71 | * @param string $name |
|
| 72 | * @return boolean |
|
| 73 | */ |
|
| 74 | public function __isset($property) |
|
| 75 | { |
|
| 76 | try { |
|
| 77 | $value = $this->__get($property); |
|
| 78 | } catch (\OutOfBoundsException $e) { |
|
| 79 | return false; |
|
| 80 | } |
|
| 81 | ||
| 82 | if (is_array($value) && !count($value)) { |
|
| 83 | return false; |
|
| 84 | } |
|
| 85 | if (is_bool($value) || is_object($value)) { |
|
| 86 | return true; |
|
| 87 | } |
|
| 88 | return (bool) $value; |
|
| 89 | } |
|
| 90 | } |
|
| 91 | ||
| @@ 144-155 (lines=12) @@ | ||
| 141 | * @param string $name |
|
| 142 | * @return boolean |
|
| 143 | */ |
|
| 144 | public function __isset($property) |
|
| 145 | { |
|
| 146 | $value = $this->__get($property); |
|
| 147 | ||
| 148 | if (is_array($value) && !count($value)) { |
|
| 149 | return false; |
|
| 150 | } |
|
| 151 | if (is_bool($value) || is_object($value)) { |
|
| 152 | return true; |
|
| 153 | } |
|
| 154 | return (bool) $value; |
|
| 155 | } |
|
| 156 | ||
| 157 | protected function checkWriteAccess() |
|
| 158 | { |
|
| @@ 279-290 (lines=12) @@ | ||
| 276 | $this->set($property, $value); |
|
| 277 | } |
|
| 278 | ||
| 279 | public function __isset($property) |
|
| 280 | { |
|
| 281 | $value = $this->__get($property); |
|
| 282 | ||
| 283 | if (is_array($value) && !count($value)) { |
|
| 284 | return false; |
|
| 285 | } |
|
| 286 | if (is_bool($value) || is_object($value)) { |
|
| 287 | return true; |
|
| 288 | } |
|
| 289 | return (bool) $value; |
|
| 290 | } |
|
| 291 | } |
|
| 292 | ||