|
@@ 341-349 (lines=9) @@
|
| 338 |
|
$this->namespace = $reflService->getClassNamespace($this->name); |
| 339 |
|
$this->instantiator = $this->instantiator ?: new Instantiator(); |
| 340 |
|
|
| 341 |
|
foreach ($this->fieldMappings as $field => $mapping) { |
| 342 |
|
if (isset($mapping['declared'])) { |
| 343 |
|
$reflField = new \ReflectionProperty($mapping['declared'], $field); |
| 344 |
|
} else { |
| 345 |
|
$reflField = $this->reflClass->getProperty($field); |
| 346 |
|
} |
| 347 |
|
$reflField->setAccessible(true); |
| 348 |
|
$this->reflFields[$field] = $reflField; |
| 349 |
|
} |
| 350 |
|
|
| 351 |
|
foreach ($this->associationsMappings as $field => $mapping) { |
| 352 |
|
if (isset($mapping['declared'])) { |
|
@@ 351-360 (lines=10) @@
|
| 348 |
|
$this->reflFields[$field] = $reflField; |
| 349 |
|
} |
| 350 |
|
|
| 351 |
|
foreach ($this->associationsMappings as $field => $mapping) { |
| 352 |
|
if (isset($mapping['declared'])) { |
| 353 |
|
$reflField = new \ReflectionProperty($mapping['declared'], $field); |
| 354 |
|
} else { |
| 355 |
|
$reflField = $this->reflClass->getProperty($field); |
| 356 |
|
} |
| 357 |
|
|
| 358 |
|
$reflField->setAccessible(true); |
| 359 |
|
$this->reflFields[$field] = $reflField; |
| 360 |
|
} |
| 361 |
|
|
| 362 |
|
if ($this->hasAttachments) { |
| 363 |
|
if ($this->attachmentDeclaredClass) { |