@@ 19-40 (lines=22) @@ | ||
16 | * |
|
17 | * @package Nnx\DoctrineFixtureModule\Filter |
|
18 | */ |
|
19 | class ChainFilterFactory |
|
20 | implements FactoryInterface, |
|
21 | MutableCreationOptionsInterface |
|
22 | { |
|
23 | use MutableCreationOptionsTrait; |
|
24 | ||
25 | /** |
|
26 | * @inheritdoc |
|
27 | * |
|
28 | * @param ServiceLocatorInterface $serviceLocator |
|
29 | * |
|
30 | * @return ChainFilter |
|
31 | */ |
|
32 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
33 | { |
|
34 | $creationOptions = $this->getCreationOptions(); |
|
35 | ||
36 | $filterList = array_key_exists('filterList', $creationOptions) ? $creationOptions['filterList'] : []; |
|
37 | ||
38 | return new ChainFilter($filterList); |
|
39 | } |
|
40 | } |
|
41 |
@@ 19-38 (lines=20) @@ | ||
16 | * |
|
17 | * @package Nnx\DoctrineFixtureModule\Loader |
|
18 | */ |
|
19 | class ChainLoaderFactory |
|
20 | implements FactoryInterface, |
|
21 | MutableCreationOptionsInterface |
|
22 | { |
|
23 | use MutableCreationOptionsTrait; |
|
24 | ||
25 | /** |
|
26 | * @param ServiceLocatorInterface $serviceLocator |
|
27 | * |
|
28 | * @return ChainLoader |
|
29 | */ |
|
30 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
31 | { |
|
32 | $creationOptions = $this->getCreationOptions(); |
|
33 | ||
34 | $loaderList = array_key_exists('loaderList', $creationOptions) ? $creationOptions['loaderList'] : []; |
|
35 | ||
36 | return new ChainLoader($loaderList); |
|
37 | } |
|
38 | } |
|
39 |
@@ 19-38 (lines=20) @@ | ||
16 | * |
|
17 | * @package Nnx\DoctrineFixtureModule\Loader |
|
18 | */ |
|
19 | class ClassLoaderFactory |
|
20 | implements FactoryInterface, |
|
21 | MutableCreationOptionsInterface |
|
22 | { |
|
23 | use MutableCreationOptionsTrait; |
|
24 | ||
25 | /** |
|
26 | * @param ServiceLocatorInterface $serviceLocator |
|
27 | * |
|
28 | * @return ClassLoader |
|
29 | */ |
|
30 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
31 | { |
|
32 | $creationOptions = $this->getCreationOptions(); |
|
33 | ||
34 | $classList = array_key_exists('classList', $creationOptions) ? $creationOptions['classList'] : []; |
|
35 | ||
36 | return new ClassLoader($classList); |
|
37 | } |
|
38 | } |
|
39 |
@@ 19-39 (lines=21) @@ | ||
16 | * |
|
17 | * @package Nnx\DoctrineFixtureModule\Loader |
|
18 | */ |
|
19 | class DirectoryLoaderFactory |
|
20 | implements FactoryInterface, |
|
21 | MutableCreationOptionsInterface |
|
22 | { |
|
23 | use MutableCreationOptionsTrait; |
|
24 | ||
25 | /** |
|
26 | * @param ServiceLocatorInterface $serviceLocator |
|
27 | * |
|
28 | * @return DirectoryLoader |
|
29 | * @throws \InvalidArgumentException |
|
30 | */ |
|
31 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
32 | { |
|
33 | $creationOptions = $this->getCreationOptions(); |
|
34 | ||
35 | $directory = array_key_exists('directory', $creationOptions) ? $creationOptions['directory'] : null; |
|
36 | ||
37 | return new DirectoryLoader($directory); |
|
38 | } |
|
39 | } |
|
40 |
@@ 19-39 (lines=21) @@ | ||
16 | * |
|
17 | * @package Nnx\DoctrineFixtureModule\Loader |
|
18 | */ |
|
19 | class GlobLoaderFactory |
|
20 | implements FactoryInterface, |
|
21 | MutableCreationOptionsInterface |
|
22 | { |
|
23 | use MutableCreationOptionsTrait; |
|
24 | ||
25 | /** |
|
26 | * @param ServiceLocatorInterface $serviceLocator |
|
27 | * |
|
28 | * @return GlobLoader |
|
29 | * @throws \InvalidArgumentException |
|
30 | */ |
|
31 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
32 | { |
|
33 | $creationOptions = $this->getCreationOptions(); |
|
34 | ||
35 | $directory = array_key_exists('directory', $creationOptions) ? $creationOptions['directory'] : null; |
|
36 | ||
37 | return new GlobLoader($directory); |
|
38 | } |
|
39 | } |
|
40 |
@@ 19-39 (lines=21) @@ | ||
16 | * |
|
17 | * @package Nnx\DoctrineFixtureModule\Loader |
|
18 | */ |
|
19 | class RecursiveDirectoryLoaderFactory |
|
20 | implements FactoryInterface, |
|
21 | MutableCreationOptionsInterface |
|
22 | { |
|
23 | use MutableCreationOptionsTrait; |
|
24 | ||
25 | /** |
|
26 | * @param ServiceLocatorInterface $serviceLocator |
|
27 | * |
|
28 | * @return RecursiveDirectoryLoader |
|
29 | * @throws \InvalidArgumentException |
|
30 | */ |
|
31 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
32 | { |
|
33 | $creationOptions = $this->getCreationOptions(); |
|
34 | ||
35 | $directory = array_key_exists('directory', $creationOptions) ? $creationOptions['directory'] : null; |
|
36 | ||
37 | return new RecursiveDirectoryLoader($directory); |
|
38 | } |
|
39 | } |
|
40 |