|
@@ 498-506 (lines=9) @@
|
| 495 |
|
|
| 496 |
|
// obtain public, protected and private properties of the class itself: |
| 497 |
|
|
| 498 |
|
foreach ($reflection->getProperties() as $property) { |
| 499 |
|
if ($property->isStatic()) { |
| 500 |
|
continue; // omit static properties |
| 501 |
|
} |
| 502 |
|
|
| 503 |
|
$property->setAccessible(true); |
| 504 |
|
|
| 505 |
|
$properties["\${$property->name}"] = $property->getValue($object); |
| 506 |
|
} |
| 507 |
|
|
| 508 |
|
// obtain any inherited private properties from parent classes: |
| 509 |
|
|
|
@@ 511-515 (lines=5) @@
|
| 508 |
|
// obtain any inherited private properties from parent classes: |
| 509 |
|
|
| 510 |
|
while ($reflection = $reflection->getParentClass()) { |
| 511 |
|
foreach ($reflection->getProperties(ReflectionProperty::IS_PRIVATE) as $property) { |
| 512 |
|
$property->setAccessible(true); |
| 513 |
|
|
| 514 |
|
$properties["{$reflection->name}::\${$property->name}"] = $property->getValue($object); |
| 515 |
|
} |
| 516 |
|
} |
| 517 |
|
|
| 518 |
|
return $properties; |