| @@ 15-22 (lines=8) @@ | ||
| 12 | /** |
|
| 13 | * {@inheritdoc} |
|
| 14 | */ |
|
| 15 | public function getRelationProvider(RelationProviderConfiguration $configuration, $object) |
|
| 16 | { |
|
| 17 | if (!preg_match('/^(?P<class>[a-z0-9_\\\\]+)::(?P<method>[a-z0-9_]+)$/i', $configuration->getName(), $matches)) { |
|
| 18 | return null; |
|
| 19 | } |
|
| 20 | ||
| 21 | return array($matches['class'], $matches['method']); |
|
| 22 | } |
|
| 23 | } |
|
| 24 | ||
| @@ 26-36 (lines=11) @@ | ||
| 23 | /** |
|
| 24 | * {@inheritdoc} |
|
| 25 | */ |
|
| 26 | public function getRelationProvider(RelationProviderConfiguration $configuration, $object) |
|
| 27 | { |
|
| 28 | if (!preg_match('/^(?P<service>[a-z0-9_.]+):(?P<method>[a-z0-9_]+)$/i', $configuration->getName(), $matches)) { |
|
| 29 | return null; |
|
| 30 | } |
|
| 31 | ||
| 32 | return array( |
|
| 33 | $this->container->get($matches['service']), |
|
| 34 | $matches['method'] |
|
| 35 | ); |
|
| 36 | } |
|
| 37 | } |
|
| 38 | ||