|
@@ 142-154 (lines=13) @@
|
| 139 |
|
$metadata = new ObjectMetadata($class->name); |
| 140 |
|
|
| 141 |
|
$properties = $class->getProperties(); |
| 142 |
|
foreach ($properties as $property) { |
| 143 |
|
if ($property->getDeclaringClass()->name !== $class->name) { |
| 144 |
|
continue; |
| 145 |
|
} |
| 146 |
|
|
| 147 |
|
$annotation = $this->reader->getPropertyAnnotation($property, Property::class); |
| 148 |
|
/* @var $annotation Property */ |
| 149 |
|
if (null === $annotation) { |
| 150 |
|
continue; |
| 151 |
|
} |
| 152 |
|
|
| 153 |
|
$metadata->addProperty($this->loadPropertyMetadata($annotation, $property)); |
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
$methods = $class->getMethods(\ReflectionMethod::IS_PUBLIC); |
| 157 |
|
foreach ($methods as $method) { |
|
@@ 157-169 (lines=13) @@
|
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
$methods = $class->getMethods(\ReflectionMethod::IS_PUBLIC); |
| 157 |
|
foreach ($methods as $method) { |
| 158 |
|
if ($method->getDeclaringClass()->name !== $class->name) { |
| 159 |
|
continue; |
| 160 |
|
} |
| 161 |
|
|
| 162 |
|
$annotation = $this->reader->getMethodAnnotation($method, VirtualProperty::class); |
| 163 |
|
/* @var $annotation VirtualProperty */ |
| 164 |
|
if ($annotation === null) { |
| 165 |
|
continue; |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
$metadata->addProperty($this->loadVirtualMetadata($annotation, $method)); |
| 169 |
|
} |
| 170 |
|
|
| 171 |
|
if (null !== $object) { |
| 172 |
|
$this->loadDiscriminatorMetadata($object, $metadata); |