Symfony DIC | 添加新扩展以在配置文件中解析新关键字

I try adding a new keyword ('ressources') in coonfig file of Sf-DIC like => array('imports', 'parameters', 'services'))

Based on \Symfony\Component\DependencyInjection\Loader\YamlFileLoader::validate, i have try to register new extension into container with BundleClass. For :

 <?php if (!$this->container->hasExtension($namespace)) { // l.429

BUT

When i register my extension like that :

    <?php 
    $extension = new ApiResourceExtension();  
         // getAlias(){ return 'resources';}

    $container->registerExtension($extension);
    $container->loadFromExtension($extension->getAlias());


    $extension = new ConfigurationExtension();
    $container->registerExtension($extension);
    $container->loadFromExtension($extension->getAlias());

I see in var_dump on vendor, when hasExtension test, No extension is registred into container...

Obliviously an error occure : here is no extension able to load the configuration for "resources"

Why Container hasn't extension when play Extension::load Method. How can i pass through to get my behavior ?

Thanks. Alborq