| @@ 89-100 (lines=12) @@ | ||
| 86 | } |
|
| 87 | ||
| 88 | // Iterate collection and resolve method configurator |
|
| 89 | if (array_key_exists('@attributes', $methodDataArray)) { |
|
| 90 | // Iterate collection attribute configurators |
|
| 91 | foreach ($this->collectionConfigurators as $key => $collectionConfigurator) { |
|
| 92 | // If this is supported collection configurator |
|
| 93 | if (array_key_exists($key, $methodDataArray['@attributes'])) { |
|
| 94 | /** @var MethodConfiguratorInterface $configurator Create instance */ |
|
| 95 | $configurator = new $collectionConfigurator($methodDataArray['@attributes'][$key]); |
|
| 96 | // Fill in class metadata |
|
| 97 | $configurator->toMethodMetadata($methodDataArray); |
|
| 98 | } |
|
| 99 | } |
|
| 100 | } |
|
| 101 | ||
| 102 | // Save method metadata |
|
| 103 | $classMetadata->methodsMetadata[$methodMetadata->name] = $methodMetadata; |
|
| @@ 50-61 (lines=12) @@ | ||
| 47 | } |
|
| 48 | ||
| 49 | // Iterate collection |
|
| 50 | if (array_key_exists('@attributes', $propertyDataArray)) { |
|
| 51 | // Iterate collection attribute configurators |
|
| 52 | foreach ($this->collectionConfigurators as $key => $collectionConfigurator) { |
|
| 53 | // If this is supported collection configurator |
|
| 54 | if (array_key_exists($key, $propertyDataArray['@attributes'])) { |
|
| 55 | /** @var PropertyConfiguratorInterface $configurator Create instance */ |
|
| 56 | $configurator = new $collectionConfigurator($propertyDataArray['@attributes'][$key]); |
|
| 57 | // Fill in class metadata |
|
| 58 | $configurator->toPropertyMetadata($propertyMetadata); |
|
| 59 | } |
|
| 60 | } |
|
| 61 | } |
|
| 62 | // Save property metadata |
|
| 63 | $classMetadata->propertiesMetadata[$propertyMetadata->name] = $propertyMetadata; |
|
| 64 | } |
|