| @@ 434-447 (lines=14) @@ | ||
| 431 | * |
|
| 432 | * @return array |
|
| 433 | */ |
|
| 434 | public function jsonSerialize() |
|
| 435 | { |
|
| 436 | $reflObject = new ReflectionObject($this); |
|
| 437 | $properties = $reflObject->getProperties(ReflectionProperty::IS_PROTECTED); |
|
| 438 | ||
| 439 | $data = []; |
|
| 440 | foreach ($properties as $property) { |
|
| 441 | $propertyName = $property->getName(); |
|
| 442 | ||
| 443 | $data[$propertyName] = $this->{$propertyName}; |
|
| 444 | } |
|
| 445 | ||
| 446 | return $data; |
|
| 447 | } |
|
| 448 | } |
|
| 449 | ||
| @@ 233-246 (lines=14) @@ | ||
| 230 | * |
|
| 231 | * @return array |
|
| 232 | */ |
|
| 233 | public function jsonSerialize() |
|
| 234 | { |
|
| 235 | $reflObject = new ReflectionObject($this); |
|
| 236 | $properties = $reflObject->getProperties(ReflectionProperty::IS_PROTECTED); |
|
| 237 | ||
| 238 | $data = []; |
|
| 239 | foreach ($properties as $property) { |
|
| 240 | $propertyName = $property->getName(); |
|
| 241 | ||
| 242 | $data[$propertyName] = $this->{$propertyName}; |
|
| 243 | } |
|
| 244 | ||
| 245 | return $data; |
|
| 246 | } |
|
| 247 | } |
|
| 248 | ||