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


PHP Container::getServiceIds方法代码示例

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


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

示例1: install

 /**
  * Fügt die zu einen Modul zugehörigen Ressourcen ein
  *
  * @param \ACP3\Core\Modules\Installer\SchemaInterface $schema
  * @param int                                          $mode
  *
  * @return bool
  */
 public function install(SchemaInterface $schema, $mode = self::INSTALL_RESOURCES_AND_RULES)
 {
     $serviceIds = $this->container->getServiceIds();
     foreach ($serviceIds as $serviceId) {
         if (strpos($serviceId, $schema->getModuleName() . '.controller.') !== false) {
             $this->insertAclResources($serviceId, $schema->specialResources());
         }
     }
     if ($mode === self::INSTALL_RESOURCES_AND_RULES) {
         $this->insertAclRules($schema->getModuleName());
     }
     $this->aclCache->getDriver()->deleteAll();
     return true;
 }
开发者ID:acp3,项目名称:core,代码行数:22,代码来源:AclInstaller.php

示例2: testGetServiceIds

 public function testGetServiceIds()
 {
     $sc = new Container();
     $sc->set('foo', $obj = new \stdClass());
     $sc->set('bar', $obj = new \stdClass());
     $this->assertEquals(array('service_container', 'foo', 'bar'), $sc->getServiceIds(), '->getServiceIds() returns all defined service ids');
     $sc = new ProjectServiceContainer();
     $this->assertEquals(array('scoped', 'scoped_foo', 'inactive', 'bar', 'foo_bar', 'foo.baz', 'circular', 'throw_exception', 'throws_exception_on_service_configuration', 'service_container'), $sc->getServiceIds(), '->getServiceIds() returns defined service ids by getXXXService() methods');
 }
开发者ID:d3ancole1995,项目名称:symfony,代码行数:9,代码来源:ContainerTest.php

示例3: testGetServiceIds

 /**
  * @covers Symfony\Component\DependencyInjection\Container::getServiceIds
  */
 public function testGetServiceIds()
 {
     $sc = new Container();
     $sc->set('foo', $obj = new \stdClass());
     $sc->set('bar', $obj = new \stdClass());
     $this->assertEquals(array('service_container', 'foo', 'bar'), $sc->getServiceIds(), '->getServiceIds() returns all defined service ids');
     $sc = new ProjectServiceContainer();
     $this->assertEquals(array('bar', 'foo_bar', 'foo.baz', 'service_container'), $sc->getServiceIds(), '->getServiceIds() returns defined service ids by getXXXService() methods');
 }
开发者ID:netixpro,项目名称:symfony,代码行数:12,代码来源:ContainerTest.php

示例4: assertSaneContainer

 public static function assertSaneContainer(Container $container, $message = '')
 {
     $errors = array();
     foreach ($container->getServiceIds() as $id) {
         try {
             $container->get($id);
         } catch (\Exception $e) {
             $errors[$id] = $e->getMessage();
         }
     }
     self::assertEquals(array(), $errors, $message);
 }
开发者ID:rfc1483,项目名称:blog,代码行数:12,代码来源:WebProfilerExtensionTest.php

示例5: getServiceIds

 /**
  * Gets all service ids.
  *
  * @return array An array of all defined service ids
  */
 public function getServiceIds()
 {
     return array_unique(array_merge(array_keys($this->getDefinitions()), array_keys($this->aliasDefinitions), parent::getServiceIds()));
 }
开发者ID:eigentor,项目名称:tommiblog,代码行数:9,代码来源:ContainerBuilder.php

示例6: testGetServiceIds

 public function testGetServiceIds()
 {
     $sc = new Container();
     $sc->set('foo', $obj = new \stdClass());
     $sc->set('bar', $obj = new \stdClass());
     $this->assertEquals(array('service_container', 'foo', 'bar'), $sc->getServiceIds(), '->getServiceIds() returns all defined service ids');
     $sc = new ProjectServiceContainer();
     $sc->set('foo', $obj = new \stdClass());
     $this->assertEquals(array('service_container', 'internal', 'bar', 'foo_bar', 'foo.baz', 'circular', 'throw_exception', 'throws_exception_on_service_configuration', 'foo'), $sc->getServiceIds(), '->getServiceIds() returns defined service ids by factory methods in the method map, followed by service ids defined by set()');
 }
开发者ID:blazarecki,项目名称:symfony,代码行数:10,代码来源:ContainerTest.php

示例7: getServiceIds

 /**
  * Gets all service ids.
  *
  * Wrapper for ContainerBuilder::getServiceIds method.
  *
  * @return array An array of all defined service ids
  */
 public function getServiceIds()
 {
     return parent::getServiceIds();
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:11,代码来源:ContainerBuilder.php

示例8: getServiceIds

 public function getServiceIds()
 {
     return $this->container->getServiceIds();
 }
开发者ID:oasmobile,项目名称:php-slimapp,代码行数:4,代码来源:SlimApp.php


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