@@ 9-21 (lines=13) @@ | ||
6 | use Zend\ServiceManager\FactoryInterface; |
|
7 | use Zend\ServiceManager\ServiceLocatorInterface; |
|
8 | ||
9 | class AnnotationBuilderConfigFactory implements FactoryInterface |
|
10 | { |
|
11 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
12 | { |
|
13 | $config = $serviceLocator->get('config'); |
|
14 | if (!isset($config['annotations']['AnnotationBuilder'])) { |
|
15 | throw new \Exception('Configuration does not have options "AnnotationBuilder"'); |
|
16 | } |
|
17 | ||
18 | $annotationConfig = new AnnotationBuilderConfig($config['annotations']['AnnotationBuilder']); |
|
19 | return $annotationConfig; |
|
20 | } |
|
21 | } |
|
22 |
@@ 9-21 (lines=13) @@ | ||
6 | use Zend\ServiceManager\FactoryInterface; |
|
7 | use Zend\ServiceManager\ServiceLocatorInterface; |
|
8 | ||
9 | class MapperBuilderConfigFactory implements FactoryInterface |
|
10 | { |
|
11 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
12 | { |
|
13 | $config = $serviceLocator->get('config'); |
|
14 | if (!isset($config['annotations']['MapperBuilder'])) { |
|
15 | throw new \Exception('Configuration does not have options "MapperBuilder"'); |
|
16 | } |
|
17 | ||
18 | $mapperConfig = new MapperBuilderConfig($config['annotations']['MapperBuilder']); |
|
19 | return $mapperConfig; |
|
20 | } |
|
21 | } |
|
22 |