Failed Conditions
Pull Request — experimental/sf (#3236)
by Kentaro
144:19 queued 116:23
created

QueryCustomizeServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1
1
<?php
2
3
/*
4
 * This file is part of EC-CUBE
5
 *
6
 * Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.lockon.co.jp/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Plugin\QueryCustomize\ServiceProvider;
15
16
use Pimple\Container;
17
use Pimple\ServiceProviderInterface;
18
use Plugin\QueryCustomize\Entity\AdminCustomerCustomizer;
19
use Silex\Api\BootableProviderInterface;
20
use Silex\Application;
21
22
class QueryCustomizeServiceProvider implements ServiceProviderInterface, BootableProviderInterface
23
{
24
    public function register(Container $app)
25
    {
26
        $app['plugin.query_customize.customer_search'] = function (Container $container) {
27
            return new AdminCustomerCustomizer();
28
        };
29
    }
30
31
    public function boot(Application $app)
32
    {
33
        $app['eccube.queries']
34
            ->addCustomizer($app['plugin.query_customize.customer_search']);
35
    }
36
}
37