| @@ 17-50 (lines=34) @@ | ||
| 14 | * |
|
| 15 | * @package MaglMarkdown\Adapter |
|
| 16 | */ |
|
| 17 | class GithubMarkdownOptionsFactory implements FactoryInterface |
|
| 18 | { |
|
| 19 | ||
| 20 | /** |
|
| 21 | * Create service |
|
| 22 | * |
|
| 23 | * @param ServiceLocatorInterface $serviceLocator |
|
| 24 | * @return Options\GithubMarkdownOptions |
|
| 25 | */ |
|
| 26 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
| 27 | { |
|
| 28 | return $this($serviceLocator, Options\GithubMarkdownOptions::class); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * Create an object |
|
| 33 | * |
|
| 34 | * @param ContainerInterface $container |
|
| 35 | * @param string $requestedName |
|
| 36 | * @param null|array $options |
|
| 37 | * @return Options\GithubMarkdownOptions |
|
| 38 | * @throws \Interop\Container\Exception\NotFoundException |
|
| 39 | * @throws ServiceNotFoundException if unable to resolve the service. |
|
| 40 | * @throws ServiceNotCreatedException if an exception is raised when |
|
| 41 | * creating a service. |
|
| 42 | * @throws ContainerException if any other error occurs |
|
| 43 | */ |
|
| 44 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
| 45 | { |
|
| 46 | $config = $container->get('config'); |
|
| 47 | ||
| 48 | return new Options\GithubMarkdownOptions($config['magl_markdown']['adapter_config']['github_markdown']); |
|
| 49 | } |
|
| 50 | } |
|
| 51 | ||
| @@ 17-50 (lines=34) @@ | ||
| 14 | * |
|
| 15 | * @package MaglMarkdown\Adapter |
|
| 16 | */ |
|
| 17 | class MichelfPHPMarkdownAdapterFactory implements FactoryInterface |
|
| 18 | { |
|
| 19 | ||
| 20 | /** |
|
| 21 | * Create service |
|
| 22 | * |
|
| 23 | * @param ServiceLocatorInterface $serviceLocator |
|
| 24 | * @return MichelfPHPMarkdownAdapter |
|
| 25 | */ |
|
| 26 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
| 27 | { |
|
| 28 | return $this($serviceLocator, MichelfPHPMarkdownAdapterFactory::class); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * Create an object |
|
| 33 | * |
|
| 34 | * @param ContainerInterface $container |
|
| 35 | * @param string $requestedName |
|
| 36 | * @param null|array $options |
|
| 37 | * @return MichelfPHPMarkdownAdapter |
|
| 38 | * @throws \Interop\Container\Exception\NotFoundException |
|
| 39 | * @throws ServiceNotFoundException if unable to resolve the service. |
|
| 40 | * @throws ServiceNotCreatedException if an exception is raised when |
|
| 41 | * creating a service. |
|
| 42 | * @throws ContainerException if any other error occurs |
|
| 43 | */ |
|
| 44 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
| 45 | { |
|
| 46 | $config = $container->get('config'); |
|
| 47 | ||
| 48 | return new MichelfPHPMarkdownAdapter($config['magl_markdown']['adapter_config']['michelf_markdown']); |
|
| 49 | } |
|
| 50 | } |
|
| 51 | ||
| @@ 17-50 (lines=34) @@ | ||
| 14 | * |
|
| 15 | * @package MaglMarkdown\Adapter |
|
| 16 | */ |
|
| 17 | class MichelfPHPMarkdownExtraAdapterFactory implements FactoryInterface |
|
| 18 | { |
|
| 19 | ||
| 20 | /** |
|
| 21 | * Create service |
|
| 22 | * |
|
| 23 | * @param ServiceLocatorInterface $serviceLocator |
|
| 24 | * @return mixed |
|
| 25 | */ |
|
| 26 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
| 27 | { |
|
| 28 | return $this($serviceLocator, MichelfPHPMarkdownExtraAdapter::class); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * Create an object |
|
| 33 | * |
|
| 34 | * @param ContainerInterface $container |
|
| 35 | * @param string $requestedName |
|
| 36 | * @param null|array $options |
|
| 37 | * @return MichelfPHPMarkdownExtraAdapter |
|
| 38 | * @throws \Interop\Container\Exception\NotFoundException |
|
| 39 | * @throws ServiceNotFoundException if unable to resolve the service. |
|
| 40 | * @throws ServiceNotCreatedException if an exception is raised when |
|
| 41 | * creating a service. |
|
| 42 | * @throws ContainerException if any other error occurs |
|
| 43 | */ |
|
| 44 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
| 45 | { |
|
| 46 | $config = $container->get('config'); |
|
| 47 | ||
| 48 | return new MichelfPHPMarkdownExtraAdapter($config['magl_markdown']['adapter_config']['michelf_markdown_extra']); |
|
| 49 | } |
|
| 50 | } |
|
| 51 | ||