| @@ 36-45 (lines=10) @@ | ||
| 33 | /** |
|
| 34 | * {@inheritdoc} |
|
| 35 | */ |
|
| 36 | public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []) |
|
| 37 | { |
|
| 38 | foreach ($this->dataProviders as $dataProviders) { |
|
| 39 | try { |
|
| 40 | return $dataProviders->getItem($resourceClass, $id, $operationName, $context); |
|
| 41 | } catch (ResourceClassNotSupportedException $e) { |
|
| 42 | continue; |
|
| 43 | } |
|
| 44 | } |
|
| 45 | } |
|
| 46 | } |
|
| 47 | ||
| @@ 36-45 (lines=10) @@ | ||
| 33 | /** |
|
| 34 | * {@inheritdoc} |
|
| 35 | */ |
|
| 36 | public function getSubcollection(string $resourceClass, $id, string $subcollectionProperty, string $operationName = null, array $context = []) |
|
| 37 | { |
|
| 38 | foreach ($this->dataProviders as $dataProviders) { |
|
| 39 | try { |
|
| 40 | return $dataProviders->getSubcollection($resourceClass, $id, $subcollectionProperty, $operationName, $context); |
|
| 41 | } catch (ResourceClassNotSupportedException $e) { |
|
| 42 | continue; |
|
| 43 | } |
|
| 44 | } |
|
| 45 | } |
|
| 46 | } |
|
| 47 | ||