如何获取symfony2 / symfony3中的捆绑软件列表? [英] How do I get a list of bundles in symfony2/symfony3?

查看:48
本文介绍了如何获取symfony2 / symfony3中的捆绑软件列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用symfony,我想从特定供应商处获取捆绑软件列表,对其进行迭代,然后在每个默认控制器上调用$ bundle-> renderSomething()函数。

I've just started using symfony and I'd like to get a list of bundles from a particular vendor, iterate through them and call a $bundle->renderSomething() function on each default controller.

首先,我需要获取要迭代的包列表,或者迭代每个对象。关于最佳方法的任何想法吗?

Firstly, I need to get the list of bundles to iterate, or iterate through each object. Any ideas on the best way to do that?

推荐答案

在控制台中执行此操作且正确输出包名称的最简单方法是:

The easiest way to do it in console and that outputs bundle names correctly is:

php app/console config:dump-reference



Symfony 3



Symfony 3

php bin/console config:dump-reference






此处的关键是不提供任何选项或参数。在这种情况下,该命令仅输出所有可用的包:


The key here is not to provide any options or arguments. In this case, the command simply outputs all available bundles:

Available registered bundles with their extension alias if available:
+------------------------------------+-----------------------------------+
| Bundle name                        | Extension alias                   |
+------------------------------------+-----------------------------------+
| FrameworkBundle                    | framework                         |
| SecurityBundle                     | security                          |
| TwigBundle                         | twig                              |
| MonologBundle                      | monolog                           |
| SwiftmailerBundle                  | swiftmailer                       |
| DoctrineBundle                     | doctrine                          |
| AsseticBundle                      | assetic                           |
| GearmanBundle                      | gearman                           |
| SMMemcacheBundle                   | sm_memcache                       |
| PrestaSitemapBundle                | presta_sitemap                    |
| DoctrineCacheBundle                | doctrine_cache                    |
| CybernoxAmazonWebServicesBundle    | cybernox_amazon_web_services      |
| FOSFacebookBundle                  | fos_facebook                      |
| HWIOAuthBundle                     | hwi_oauth                         |
| FkrSimplePieBundle                 | fkr_simple_pie                    |
| RMSPushNotificationsBundle         | rms_push_notifications            |
| RobertoTruToInlineStyleEmailBundle | roberto_tru_to_inline_style_email |
| InsomniaMaxMindGeoIpBundle         | insomnia_max_mind_geo_ip          |
| EWZRecaptchaBundle                 | ewz_recaptcha                     |
| MopaBootstrapBundle                | mopa_bootstrap                    |
| JanThomas89MailSafeBundle          | jan_thomas89_mail_safe            |
| WebProfilerBundle                  | web_profiler                      |
| SensioDistributionBundle           | sensio_distribution               |
| SensioGeneratorBundle              |                                   |
+------------------------------------+-----------------------------------+

这篇关于如何获取symfony2 / symfony3中的捆绑软件列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆