38 lines
1.1 KiB
PHP
38 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pcm\SearchBundle\DependencyInjection;
|
|
|
|
use Symfony\Component\Config\FileLocator;
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
|
|
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
|
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
|
|
|
final class PcmSearchExtension extends Extension implements PrependExtensionInterface
|
|
{
|
|
public function prepend(ContainerBuilder $container): void
|
|
{
|
|
$container->loadFromExtension(
|
|
'doctrine',
|
|
[
|
|
'orm' => [
|
|
'dql' => [
|
|
'string_functions' => [
|
|
'match' => 'DoctrineExtensions\Query\Mysql\MatchAgainst'
|
|
]
|
|
]
|
|
]
|
|
]
|
|
);
|
|
}
|
|
|
|
public function load(array $configs, ContainerBuilder $container): void
|
|
{
|
|
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../../config'));
|
|
|
|
$loader->load('services.yaml');
|
|
}
|
|
}
|