@@ 27-34 (lines=8) @@ | ||
24 | * |
|
25 | * @throws CannotGetValue |
|
26 | */ |
|
27 | public function getValue(ServiceLocatorInterface $sm) |
|
28 | { |
|
29 | try { |
|
30 | return $this->read($sm->get('config'), $this->value); |
|
31 | } catch (\InvalidArgumentException $e) { |
|
32 | throw CannotGetValue::of($this->value, $e); |
|
33 | } |
|
34 | } |
|
35 | ||
36 | /** |
|
37 | * Convert dotted notation to config value. |
@@ 27-34 (lines=8) @@ | ||
24 | * |
|
25 | * @throws CannotGetValue |
|
26 | */ |
|
27 | public function getValue(ServiceLocatorInterface $sm) |
|
28 | { |
|
29 | try { |
|
30 | return $sm->get('Doctrine\ORM\EntityManager')->getRepository($this->value); |
|
31 | } catch (\Exception $e) { |
|
32 | throw CannotGetValue::of(sprintf('repository of %s', $this->value), $e); |
|
33 | } |
|
34 | } |
|
35 | } |
|
36 |