Last active
December 8, 2020 01:45
-
-
Save kurozumi/14baae5c211c3fbcb50410af2613e477 to your computer and use it in GitHub Desktop.
会員タイプのインターフェースが実装されたクラスに自動タグ付け
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This file is part of CustomerType | |
* | |
* Copyright(c) Akira Kurozumi <info@a-zumi.net> | |
* | |
* https://a-zumi.net | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ | |
namespace Plugin\CustomerType\DependencyInjection; | |
use Plugin\CustomerType\Service\Customer\CustomerTypeInterface; | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\DependencyInjection\Extension\Extension; | |
class CustomerTypeExtension extends Extension | |
{ | |
/** | |
* 会員タイプのStrategyインターフェースが実装されたクラスにeccube.customer.typeをタグ付け | |
* | |
* @param array $configs | |
* @param ContainerBuilder $container | |
*/ | |
public function load(array $configs, ContainerBuilder $container) | |
{ | |
$container->registerForAutoconfiguration(CustomerTypeInterface::class) | |
->addTag(CustomerTypeCompilerPass::CUSTOMR_TYPE_TAG); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment