当前位置: 首页>>代码示例>>PHP>>正文


PHP ContainerBuilder::setAlias方法代码示例

本文整理汇总了PHP中Symfony\Component\DependencyInjection\ContainerBuilder::setAlias方法的典型用法代码示例。如果您正苦于以下问题:PHP ContainerBuilder::setAlias方法的具体用法?PHP ContainerBuilder::setAlias怎么用?PHP ContainerBuilder::setAlias使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Component\DependencyInjection\ContainerBuilder的用法示例。


在下文中一共展示了ContainerBuilder::setAlias方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: load

 /**
  * {@inheritDoc}
  */
 public function load(array $configs, ContainerBuilder $container)
 {
     $configuration = new Configuration();
     $config = $this->processConfiguration($configuration, $configs);
     $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
     $loader->load('shorty.xml');
     foreach ($config['providers'] as $providerName => $providerConfiguration) {
         switch ($providerConfiguration['id']) {
             case 'google':
                 $definition = new Definition($container->getParameter('rezzza.shorty.google.class'), array($providerConfiguration['key']));
                 $definition->addMethodCall('setHttpAdapter', array(new Definition($providerConfiguration['http_adapter'])));
                 $container->setDefinition($this->getShortyProviderName($providerName), $definition);
                 break;
             case 'bitly':
                 $definition = new Definition($container->getParameter('rezzza.shorty.bitly.class'), array($providerConfiguration['access_token']));
                 $definition->addMethodCall('setHttpAdapter', array(new Definition($providerConfiguration['http_adapter'])));
                 $container->setDefinition($this->getShortyProviderName($providerName), $definition);
                 break;
             case 'chain':
                 $definition = new Definition($container->getParameter('rezzza.shorty.chain.class'));
                 foreach ($providerConfiguration['providers'] as $provider) {
                     $definition->addMethodCall('addProvider', array(new Reference($this->getShortyProviderName($provider))));
                 }
                 $container->setDefinition($this->getShortyProviderName($providerName), $definition);
                 break;
             default:
                 $container->setAlias($this->getShortyProviderName($providerName), $providerConfiguration['id']);
                 break;
         }
     }
     if (isset($config['default_provider'])) {
         $container->setAlias('rezzza.shorty', $this->getShortyProviderName($config['default_provider']));
     }
 }
开发者ID:shouze,项目名称:ShortyBundle,代码行数:37,代码来源:RezzzaShortyExtension.php

示例2: process

 public function process(ContainerBuilder $container)
 {
     $definitions = new \SplPriorityQueue();
     $order = PHP_INT_MAX;
     foreach ($container->getDefinitions() as $id => $definition) {
         if (!($decorated = $definition->getDecoratedService())) {
             continue;
         }
         $definitions->insert(array($id, $definition), array($decorated[2], --$order));
     }
     foreach ($definitions as list($id, $definition)) {
         list($inner, $renamedId) = $definition->getDecoratedService();
         $definition->setDecoratedService(null);
         if (!$renamedId) {
             $renamedId = $id . '.inner';
         }
         // we create a new alias/service for the service we are replacing
         // to be able to reference it in the new one
         if ($container->hasAlias($inner)) {
             $alias = $container->getAlias($inner);
             $public = $alias->isPublic();
             $container->setAlias($renamedId, new Alias((string) $alias, false));
         } else {
             $definition = $container->getDefinition($inner);
             $public = $definition->isPublic();
             $definition->setPublic(false);
             $container->setDefinition($renamedId, $definition);
         }
         $container->setAlias($inner, new Alias($id, $public));
     }
 }
开发者ID:Ener-Getick,项目名称:symfony,代码行数:31,代码来源:DecoratorServicePass.php

示例3: load

 /**
  * {@inheritDoc}
  */
 public function load(array $configs, ContainerBuilder $container)
 {
     $configuration = new Configuration();
     $config = $this->processConfiguration($configuration, $configs);
     $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
     if (!in_array(strtolower($config['db_driver']), array('orm'))) {
         throw new \InvalidArgumentException(sprintf('Invalid database driver (bait_poll.db_driver) "%s".', $config['db_driver']));
     }
     $loader->load(sprintf('%s.xml', $config['db_driver']));
     $container->setParameter('bait_poll.model_manager_name', $config['model_manager_name']);
     $container->setParameter('bait_poll.form.type', $config['form']['type']);
     $container->setParameter('bait_poll.form.name', $config['form']['name']);
     $container->setAlias('bait_poll.form.factory', $config['form']['factory']);
     $container->setParameter('bait_poll.poll.class', $config['poll']['class']);
     $container->setParameter('bait_poll.field.class', $config['field']['class']);
     $container->setParameter('bait_poll.vote.class', $config['vote']['class']);
     $container->setParameter('bait_poll.form.template', $config['form']['template']);
     $container->setParameter('bait_poll.form.theme', $config['form']['theme']);
     $container->setAlias('bait_poll.vote.manager', $config['vote']['manager']);
     $container->setAlias('bait_poll.poll.manager', $config['poll']['manager']);
     $loader->load('form.xml');
     $container->setParameter('bait_poll.cookie.prefix', $config['cookie']['prefix']);
     $container->setParameter('bait_poll.cookie.duration', $config['cookie']['duration']);
     $loader->load('poll.xml');
 }
开发者ID:rafix,项目名称:BaitPollBundle,代码行数:28,代码来源:BaitPollExtension.php

示例4: process

    public function process( ContainerBuilder $container )
    {
        if ( !$container->hasAlias( 'session.storage' ) )
        {
            return;
        }

        $sessionStorageAlias = $container->getAlias( 'session.storage' );
        $sessionStorageProxyDef = $container->findDefinition( 'ezpublish_legacy.session_storage_proxy' );
        $sessionStorageProxyDef->replaceArgument( 1, new Reference( (string)$sessionStorageAlias ) );
        $container->setAlias( 'session.storage', 'ezpublish_legacy.session_storage_proxy' );

        if ( $container->hasAlias( 'session.handler' ) )
        {
            $sessionHandlerAlias = $container->getAlias( 'session.handler' );
            $interfaces = class_implements( $container->findDefinition( (string)$sessionHandlerAlias ) );
            // Only swap session handler if it implements appropriate interface.
            if ( isset( $interfaces['SessionHandlerInterface'] ) )
            {
                $sessionHandlerProxyDef = $container->findDefinition( 'ezpublish_legacy.session_handler_proxy' );
                $sessionHandlerProxyDef->replaceArgument( 1, new Reference( (string)$sessionHandlerAlias ) );
                $container->setAlias( 'session.handler', 'ezpublish_legacy.session_handler_proxy' );
            }
        }
    }
开发者ID:ezsystemstraining,项目名称:ez54training,代码行数:25,代码来源:LegacySessionPass.php

示例5: load

 /**
  * {@inheritDoc}
  */
 public function load(array $configs, ContainerBuilder $container)
 {
     $configuration = new Configuration();
     $config = $this->processConfiguration($configuration, $configs);
     $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
     foreach (array('services', 'form') as $service) {
         $loader->load(sprintf('%s.xml', $service));
     }
     if ($config['service'] == 's3') {
         $loader->load('s3.xml');
     } else {
         $loader->load('connector.xml');
     }
     switch ($config['service']) {
         case 'php':
             $container->setAlias('jonlil_ckfinder.connector', 'jonlil.ckfinder.connector.php');
             break;
         case 's3':
             $container->setAlias('jonlil_ckfinder.connector', 'jonlil.ckfinder.connector.s3');
             $container->setParameter('jonlil_ckfinder.amazon', array('secret' => $config['secret'], 'bucket' => $config['bucket'], 'access_key' => $config['accessKey'], 'base_url' => $config['baseUrl'], 'base_dir' => $config['baseDir'], 'thumbnails_file' => $config['thumbnailsFile'], 'thumbnails_enabled' => $config['thumbnailsEnabled'], 'direct_access' => $config['directAccess'], 'file_delete' => $config['fileDelete'], 'file_rename' => $config['fileRename'], 'file_upload' => $config['fileUpload'], 'file_view' => $config['fileView'], 'folder_delete' => $config['folderDelete'], 'folder_rename' => $config['folderRename'], 'folder_create' => $config['folderCreate'], 'folder_view' => $config['folderView']));
             $container->setParameter('jonlil_ckfinder.baseDir', $config['baseDir']);
             break;
     }
     $container->setParameter('jonlil_ckfinder.license', array('key' => $config['license']['key'], 'name' => $config['license']['name']));
     $container->setParameter('jonlil_ckfinder.baseUrl', $config['baseUrl']);
     $container->setParameter('twig.form.resources', array_merge($container->getParameter('twig.form.resources'), array('JonlilCKFinderBundle:Form:ckfinder_widget.html.twig')));
 }
开发者ID:spin7ion,项目名称:JonlilCKFinderBundle,代码行数:30,代码来源:JonlilCKFinderExtension.php

示例6: process

 /**
  * {@inheritdoc}
  */
 public function process(ContainerBuilder $container)
 {
     if ($container->hasDefinition('doctrine')) {
         $definition = new DefinitionDecorator('dag.form.type.object_to_identifier');
         $definition->addArgument(new Reference('doctrine'));
         $definition->addArgument('dag_entity_to_identifier');
         $definition->addTag('form.type', array('alias' => 'dag_entity_to_identifier'));
         $container->setDefinition('dag_entity_to_identifier', $definition);
     }
     if ($container->hasDefinition('doctrine_mongodb')) {
         $definition = new DefinitionDecorator('dag.form.type.object_to_identifier');
         $definition->addArgument(new Reference('doctrine_mongodb'));
         $definition->addArgument('dag_document_to_identifier');
         $definition->addTag('form.type', array('alias' => 'dag_document_to_identifier'));
         $container->setDefinition('dag_document_to_identifier', $definition);
         if (!$container->hasDefinition('dag_entity_to_identifier')) {
             $container->setAlias('dag_entity_to_identifier', 'dag_document_to_identifier');
         }
     }
     if ($container->hasDefinition('doctrine_phpcr')) {
         $definition = new DefinitionDecorator('dag.form.type.object_to_identifier');
         $definition->addArgument(new Reference('doctrine_phpcr'));
         $definition->addArgument('dag_phpcr_document_to_identifier');
         $definition->addTag('form.type', array('alias' => 'dag_phpcr_document_to_identifier'));
         $container->setDefinition('dag_phpcr_document_to_identifier', $definition);
         if (!$container->hasDefinition('dag_entity_to_identifier')) {
             $container->setAlias('dag_entity_to_identifier', 'dag_phpcr_document_to_identifier');
         }
     }
 }
开发者ID:upenn-dag,项目名称:dag-framework,代码行数:33,代码来源:ObjectToIdentifierServicePass.php

示例7: load

 /**
  * {@inheritDoc}
  */
 public function load(array $configs, ContainerBuilder $container)
 {
     $configuration = new Configuration();
     $config = $this->processConfiguration($configuration, $configs);
     $prefix = self::PREFIX;
     $container->setAlias($prefix . self::RECIPIENT_PROVIDER, $config[self::RECIPIENT_PROVIDER]);
     $container->setParameter($prefix . self::RECIPIENT_CLASS, $config[self::RECIPIENT_CLASS]);
     $container->setParameter($prefix . self::RECIPIENT_NEWSLETTER_FIELD, $config[self::RECIPIENT_NEWSLETTER_FIELD]);
     $container->setAlias($prefix . self::TEMPLATE_PROVIDER, $config[self::TEMPLATE_PROVIDER]);
     $container->setAlias($prefix . self::TEMPLATE_TWIG_SWIFT_MAILER, $config[self::TEMPLATE_TWIG_SWIFT_MAILER]);
     $container->setParameter($prefix . 'no_reply', array('email' => $config[self::NO_REPLY][self::NO_REPLY_EMAIL_ADDRESS], 'name' => $config[self::NO_REPLY][self::NO_REPLY_EMAIL_NAME]));
     $container->setParameter($prefix . self::TEMPLATE_IMAGE_DIR, realpath($config[self::TEMPLATE_IMAGE_DIR]));
     $allowedFolders = array();
     foreach ($config[self::ALLOWED_IMAGES_FOLDERS] as $folder) {
         $allowedFolders[] = realpath($folder);
     }
     $container->setParameter($prefix . self::ALLOWED_IMAGES_FOLDERS, $allowedFolders);
     $container->setAlias($prefix . self::NOTIFIER_SERVICE, $config[self::NOTIFIER_SERVICE]);
     $container->setParameter($prefix . self::NEWSLETTER . "_" . self::NEWSLETTER_INTERVAL, $config[self::NEWSLETTER][self::NEWSLETTER_INTERVAL]);
     $container->setParameter($prefix . self::NEWSLETTER . "_" . self::NEWSLETTER_SEND_TIME, $config[self::NEWSLETTER][self::NEWSLETTER_SEND_TIME]);
     $container->setParameter($prefix . self::TEMPLATES . "_" . self::NEWSLETTER_TEMPLATE, $config[self::TEMPLATES][self::NEWSLETTER_TEMPLATE]);
     $container->setParameter($prefix . self::TEMPLATES . "_" . self::NOTIFICATIONS_TEMPLATE, $config[self::TEMPLATES][self::NOTIFICATIONS_TEMPLATE]);
     $container->setParameter($prefix . self::TEMPLATES . "_" . self::CONTENT_ITEM_TEMPLATE, $config[self::TEMPLATES][self::CONTENT_ITEM_TEMPLATE]);
     $container->setParameter($prefix . self::CAMPAIGN_PARAM_NAME, $config[self::CAMPAIGN_PARAM_NAME]);
     $container->setParameter($prefix . self::CAMPAIGN_KEYWORD_PARAM_NAME, $config[self::CAMPAIGN_KEYWORD_PARAM_NAME]);
     $container->setAlias($prefix . self::WEB_VIEW_SERVICE, $config[self::WEB_VIEW_SERVICE]);
     $container->setParameter($prefix . self::WEB_VIEW_RETENTION, $config[self::WEB_VIEW_RETENTION]);
     $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
     $loader->load('services.yml');
 }
开发者ID:keynetic,项目名称:email-bundle,代码行数:33,代码来源:AzineEmailExtension.php

示例8: load

 /**
  * Loads the configs for Cache and puts data into the container.
  *
  * @param array            $configs   Array of configs
  * @param ContainerBuilder $container Container Object
  */
 public function load(array $configs, ContainerBuilder $container)
 {
     $configuration = new Configuration();
     $config = $this->processConfiguration($configuration, $configs);
     $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
     $loader->load('services.yml');
     // Configure client services
     $first = isset($config['providers']['default']) ? 'default' : null;
     foreach ($config['providers'] as $name => $arguments) {
         if ($first === null) {
             $first = $name;
         }
         $factoryClass = $container->getDefinition($arguments['factory'])->getClass();
         $factoryClass::validate($arguments['options'], $name);
         // See if any option has a service reference
         $arguments['options'] = $this->findReferences($arguments['options']);
         $def = $container->register('cache.provider.' . $name, DummyAdapter::class);
         $def->setFactory([new Reference($arguments['factory']), 'createAdapter'])->addArgument($arguments['options']);
         $def->addTag('cache.provider');
         foreach ($arguments['aliases'] as $alias) {
             $container->setAlias($alias, 'cache.provider.' . $name);
         }
     }
     if ($first !== null) {
         $container->setAlias('cache', 'cache.provider.' . $first);
     }
 }
开发者ID:php-cache,项目名称:adapter-bundle,代码行数:33,代码来源:CacheAdapterExtension.php

示例9: process

 public function process(ContainerBuilder $container)
 {
     $viewReferenceManagers = $container->findTaggedServiceIds('view_reference.manager');
     $viewReferenceRepositories = $container->findTaggedServiceIds('view_reference.repository');
     $connectors = [];
     $connectorType = $container->getParameter('victoire_view_reference.connector.type');
     foreach ($viewReferenceManagers as $id => $tags) {
         foreach ($tags as $attributes) {
             $connectors[$attributes['connector']]['manager'] = $id;
         }
     }
     foreach ($viewReferenceRepositories as $id => $tags) {
         foreach ($tags as $attributes) {
             $connectors[$attributes['connector']]['repository'] = $id;
         }
     }
     if (!isset($connectorType)) {
         throw new \Exception('No manager and repository found to have ' . $connectorType . ' connector.');
     }
     if (!isset($connectors[$connectorType]['manager'])) {
         throw new \Exception('No manager found to have ' . $connectorType . ' connector.');
     }
     if (!isset($connectors[$connectorType]['repository'])) {
         throw new \Exception('No repository found to have ' . $connectorType . ' connector.');
     }
     $container->setAlias('victoire_view_reference.connector.manager', $connectors[$connectorType]['manager']);
     $container->setAlias('victoire_view_reference.connector.repository', $connectors[$connectorType]['repository']);
 }
开发者ID:victoire,项目名称:victoire,代码行数:28,代码来源:ViewReferenceConnectorCompilerPass.php

示例10: load

 /**
  * {@inheritDoc}
  */
 public function load(array $configs, ContainerBuilder $container)
 {
     $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config/'));
     $loader->load('services.xml');
     $processor = new Processor();
     $config = $processor->processConfiguration(new Configuration(), $configs);
     $collection = 'in_memory';
     switch (true) {
         case 'redis' === $config['persistence']:
             $loader->load('redis.xml');
             $collection = 'predis';
             $container->setParameter('qandidate.toggle.redis.namespace', $config['redis_namespace']);
             $container->setAlias('qandidate.toggle.redis.client', $config['redis_client']);
             break;
         case 'factory' === $config['persistence']:
             $collection = 'factory';
             $definition = new DefinitionDecorator('qandidate.toggle.collection.in_memory');
             $definition->setFactory(array(new Reference($config['collection_factory']['service_id']), $config['collection_factory']['method']));
             $container->setDefinition('qandidate.toggle.collection.factory', $definition);
             break;
     }
     $container->setAlias('qandidate.toggle.collection', 'qandidate.toggle.collection.' . $collection);
     $contextFactoryService = 'qandidate.toggle.user_context_factory';
     if (null !== $config['context_factory']) {
         $contextFactoryService = $config['context_factory'];
     }
     $container->setAlias('qandidate.toggle.context_factory', $contextFactoryService);
 }
开发者ID:schmeiserd,项目名称:qandidate-toggle-bundle,代码行数:31,代码来源:QandidateToggleExtension.php

示例11: setUp

 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     $this->container_builder = new ContainerBuilder();
     $this->container_builder->register('foo', 'My/Class');
     $this->container_builder->setAlias('bar', 'foo');
     $this->dumper = new PhpArrayDumper($this->container_builder);
 }
开发者ID:EarthTeam,项目名称:earthteam.net,代码行数:10,代码来源:PhpArrayDumperTest.php

示例12: process

 /**
  * {@inheritdoc}
  */
 public function process(ContainerBuilder $container)
 {
     $container->getDefinition('jms_serializer.json_serialization_visitor')->addArgument($container->getDefinition('json_api.metadata_factory'))->addArgument('%json_api.show_version_info%')->setClass('Mango\\Bundle\\JsonApiBundle\\Serializer\\JsonApiSerializationVisitor');
     $container->setAlias('jms_serializer', 'json_api.serializer');
     $container->setAlias('serializer', 'json_api.serializer');
     $container->setAlias('fos_rest.serializer', 'json_api.serializer');
 }
开发者ID:jared-fraser,项目名称:JsonApiBundle,代码行数:10,代码来源:SerializerPass.php

示例13: process

 public function process(ContainerBuilder $container)
 {
     if ($container->has('fos_rest.serializer')) {
         $class = $container->getParameterBag()->resolveValue($container->findDefinition('fos_rest.serializer')->getClass());
         if (!is_subclass_of($class, 'FOS\\RestBundle\\Serializer\\Serializer')) {
             throw new \InvalidArgumentException(sprintf('"fos_rest.serializer" must implement FOS\\RestBundle\\Serializer\\Serializer (instance of "%s" given).', $class));
         }
         return;
     }
     if (!$container->has('serializer') && !$container->has('jms_serializer.serializer')) {
         throw new \InvalidArgumentException('Neither a service called "jms_serializer.serializer" nor "serializer" is available and no serializer is explicitly configured. You must either enable the JMSSerializerBundle, enable the FrameworkBundle serializer or configure a custom serializer.');
     }
     if ($container->has('serializer')) {
         $class = $container->getParameterBag()->resolveValue($container->findDefinition('serializer')->getClass());
         if (is_subclass_of($class, 'Symfony\\Component\\Serializer\\SerializerInterface')) {
             $container->setAlias('fos_rest.serializer', 'fos_rest.serializer.symfony');
             $container->removeDefinition('fos_rest.serializer.exception_wrapper_serialize_handler');
         } elseif (is_subclass_of($class, 'JMS\\Serializer\\SerializerInterface')) {
             $container->setAlias('fos_rest.serializer', 'fos_rest.serializer.jms');
         } elseif (is_subclass_of($class, 'FOS\\RestBundle\\Serializer\\Serializer')) {
             $container->setAlias('fos_rest.serializer', 'serializer');
         } else {
             throw new \InvalidArgumentException(sprintf('"fos_rest.serializer" must implement FOS\\RestBundle\\Serializer\\Serializer (instance of "%s" given).', $class));
         }
         return;
     } else {
         $container->removeDefinition('fos_rest.serializer.exception_wrapper_normalizer');
     }
     if ($container->has('jms_serializer.serializer')) {
         $container->setAlias('fos_rest.serializer', 'fos_rest.serializer.jms');
     } else {
         $container->removeDefinition('fos_rest.serializer.exception_wrapper_serialize_handler');
     }
 }
开发者ID:sblaut,项目名称:FOSRestBundle,代码行数:34,代码来源:SerializerConfigurationPass.php

示例14: process

 public function process(ContainerBuilder $container)
 {
     // "query.max_query_count" is an array, it is only accessible
     // through "query" node and getting the "max_query_count" array
     // key with PHP.
     $query = $container->getParameter('liip_functional_test.query');
     if (null === $query['max_query_count']) {
         $container->removeDefinition('liip_functional_test.query.count_client');
         return;
     }
     if ($container->hasDefinition('test.client')) {
         // test.client is a definition.
         // Register it again as a private service to inject it as the parent
         $definition = $container->getDefinition('test.client');
         $definition->setPublic(false);
         $container->setDefinition('liip_functional_test.query.count_client.parent', $definition);
     } elseif ($container->hasAlias('test.client')) {
         // test.client is an alias.
         // Register a private alias for this service to inject it as the parent
         $container->setAlias('liip_functional_test.query.count_client.parent', new Alias((string) $container->getAlias('test.client'), false));
     } else {
         throw new \Exception('The LiipFunctionalTestBundle\'s Query Counter can only be used in the test environment.' . PHP_EOL . 'See https://github.com/liip/LiipFunctionalTestBundle#only-in-test-environment');
     }
     $container->setAlias('test.client', 'liip_functional_test.query.count_client');
 }
开发者ID:Kilix,项目名称:LiipFunctionalTestBundle,代码行数:25,代码来源:SetTestClientPass.php

示例15: load

 /**
  * {@inheritdoc}
  */
 public function load(array $configs, ContainerBuilder $container)
 {
     $configuration = new Configuration();
     $config = $this->processConfiguration($configuration, $configs);
     $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
     $loader->load('commands.xml');
     $loader->load('controllers.xml');
     $loader->load('form-handlers.xml');
     $loader->load('form-subscribers.xml');
     $loader->load('form-types.xml');
     $loader->load('forms.xml');
     $loader->load('handlers.xml');
     $loader->load('jobs.xml');
     $loader->load('services.xml');
     if (!in_array(strtolower($config['db_driver']), ['mongodb', 'orm'])) {
         throw new \InvalidArgumentException(sprintf('Invalid db driver "%s".', $config['db_driver']));
     }
     $loader->load('db_driver/' . sprintf('%s.xml', $config['db_driver']));
     $container->setAlias($this->getAlias() . '.manager.job_configuration', $config['job_configuration_manager']);
     $container->setAlias($this->getAlias() . '.manager.job_report', $config['job_report_manager']);
     $container->setParameter($this->getAlias() . '.model.job_configuration.class', $config['class']['model']['job_configuration']);
     $container->setParameter($this->getAlias() . '.model.job_report.class', $config['class']['model']['job_report']);
     $container->setParameter($this->getAlias() . '.queues', $config['queues']);
     $container->setParameter($this->getAlias() . '.reset.timeout', $config['reset']['timeout']);
 }
开发者ID:aistis-,项目名称:JobQueueBundle,代码行数:28,代码来源:AurejaJobQueueExtension.php


注:本文中的Symfony\Component\DependencyInjection\ContainerBuilder::setAlias方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。