protected static function registerMarkdownEngine(EngineResolver $engines, ContainerInterface $container): void
    {
        $markdown = null;

        if ($container->has(ParsedownExtra::class)) {
            $markdown = $container->get(ParsedownExtra::class);
        } elseif ($container->has(Parsedown::class)) {
            $markdown = $container->get(Parsedown::class);
        }

        $engines->register('md', static function () use ($markdown) {
            return new MarkdownEngine($markdown);
        });
    }
protected static function registerMarkdownEngine(EngineResolver $engines, ContainerInterface $container): void
    {
        $markdown = null;

        if ($container->has(ParsedownExtra::class)) {
            $markdown = $container->get(ParsedownExtra::class);
        } elseif ($container->has(Parsedown::class)) {
            $markdown = $container->get(Parsedown::class);
        }

        $engines->register('md', static function () use ($markdown) {
            return new MarkdownEngine($markdown);
        });
    }
protected static function registerMarkdownEngine ( EngineResolver $ engines , ContainerInterface $ container ) : void { $ markdown = null ; if ( $ container -> has ( ParsedownExtra :: class ) ) { $ markdown = $ container -> get ( ParsedownExtra :: class ) ; } elseif ( $ container -> has ( Parsedown :: class ) ) { $ markdown = $ container -> get ( Parsedown :: class ) ; } $ engines -> register ( 'md' , static function ( ) use ( $ markdown ) { return new MarkdownEngine ( $ markdown ) ; } ) ; }
Register the Markdown engine implementation.

@param \Viserio\Component\View\Engine\EngineResolver $engines
@param \Psr\Container\ContainerInterface             $container

@return void
Register the Markdown engine implementation .