21 lines
578 B
PHP
21 lines
578 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace KupShop\UserOauthBundle\DependencyInjection\Compiler;
|
|
|
|
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
|
|
class ResourceOwnerPass implements CompilerPassInterface
|
|
{
|
|
public function process(ContainerBuilder $container)
|
|
{
|
|
foreach ($container->getDefinitions() as $key => $definition) {
|
|
if (str_starts_with($key, 'hwi_oauth.resource_owner.')) {
|
|
$definition->setAutowired(true);
|
|
}
|
|
}
|
|
}
|
|
}
|