for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Lichtenwallner (https://lichtenwallner.at)
*
* @see https://github.com/jolicht/markdown-cms for the canonical source repository
* @license https://github.com/jolicht/markdown-cms/blob/master/LICENSE MIT
* @copyright Copyright (c) Johannes Lichtenwallner
*/
declare(strict_types = 1);
namespace Jolicht\MarkdownCms\Parser;
use Zend\ServiceManager\Factory\FactoryInterface;
use Interop\Container\ContainerInterface;
class ParseContentExecutorFactory implements FactoryInterface
{
public function __invoke(ContainerInterface $container, $requestedName, array $options = null) : ParseContentExecutor
$parseContentExecutor = new ParseContentExecutor(
$container->get(ContentParser::class)
);
$config = $container->get('config');
foreach ($config['markdown_cms']['options']['parse_content_executor']['observers'] as $observer) {
$parseContentExecutor->addObserver($container->get($observer));
}
return $parseContentExecutor;