mirror of
https://github.com/KnpLabs/KnpMarkdownBundle.git
synced 2024-05-27 19:12:58 +02:00
Fix dependency injection
This commit is contained in:
parent
8f8693d911
commit
b40f02d9a1
|
@ -2,23 +2,23 @@
|
|||
|
||||
namespace Bundle\MarkdownBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Components\DependencyInjection\Loader\LoaderExtension;
|
||||
use Symfony\Components\DependencyInjection\Extension\Extension;
|
||||
use Symfony\Components\DependencyInjection\Loader\XmlFileLoader;
|
||||
use Symfony\Components\DependencyInjection\BuilderConfiguration;
|
||||
use Symfony\Components\DependencyInjection\ContainerBuilder;
|
||||
|
||||
class MarkdownExtension extends LoaderExtension
|
||||
class MarkdownExtension extends Extension
|
||||
{
|
||||
|
||||
public function parserLoad($config, BuilderConfiguration $configuration)
|
||||
public function parserLoad($config, ContainerBuilder $container)
|
||||
{
|
||||
$loader = new XmlFileLoader(__DIR__.'/../Resources/config');
|
||||
$configuration->merge($loader->load('parser.xml'));
|
||||
$loader = new XmlFileLoader($container, __DIR__.'/../Resources/config');
|
||||
$loader->load('parser.xml');
|
||||
}
|
||||
|
||||
public function helperLoad($config, $configuration)
|
||||
public function helperLoad($config, ContainerBuilder $container)
|
||||
{
|
||||
$loader = new XmlFileLoader(__DIR__.'/../Resources/config');
|
||||
$configuration->merge($loader->load('parser.xml'));
|
||||
$loader = new XmlFileLoader($container, __DIR__.'/../Resources/config');
|
||||
$loader->load('helper.xml');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,14 +5,14 @@ namespace Bundle\MarkdownBundle;
|
|||
use Bundle\MarkdownBundle\DependencyInjection\MarkdownExtension;
|
||||
use Symfony\Framework\Bundle\Bundle as BaseBundle;
|
||||
use Symfony\Components\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||
use Symfony\Components\DependencyInjection\Loader\Loader;
|
||||
use Symfony\Components\DependencyInjection\ContainerBuilder;
|
||||
|
||||
class MarkdownBundle extends BaseBundle
|
||||
{
|
||||
|
||||
public function buildContainer(ParameterBagInterface $parameterBag)
|
||||
{
|
||||
Loader::registerExtension(new MarkdownExtension());
|
||||
ContainerBuilder::registerExtension(new MarkdownExtension());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue