1. <tfoot id='mB1tz'></tfoot>

      <i id='mB1tz'><tr id='mB1tz'><dt id='mB1tz'><q id='mB1tz'><span id='mB1tz'><b id='mB1tz'><form id='mB1tz'><ins id='mB1tz'></ins><ul id='mB1tz'></ul><sub id='mB1tz'></sub></form><legend id='mB1tz'></legend><bdo id='mB1tz'><pre id='mB1tz'><center id='mB1tz'></center></pre></bdo></b><th id='mB1tz'></th></span></q></dt></tr></i><div id='mB1tz'><tfoot id='mB1tz'></tfoot><dl id='mB1tz'><fieldset id='mB1tz'></fieldset></dl></div>
      • <bdo id='mB1tz'></bdo><ul id='mB1tz'></ul>

    2. <legend id='mB1tz'><style id='mB1tz'><dir id='mB1tz'><q id='mB1tz'></q></dir></style></legend>

      <small id='mB1tz'></small><noframes id='mB1tz'>

        如何在 Symfony2 配置中添加具有值的数组?

        How to add an array with values in Symfony2 configuration?(如何在 Symfony2 配置中添加具有值的数组?)

        1. <legend id='ZqDnz'><style id='ZqDnz'><dir id='ZqDnz'><q id='ZqDnz'></q></dir></style></legend>

            <i id='ZqDnz'><tr id='ZqDnz'><dt id='ZqDnz'><q id='ZqDnz'><span id='ZqDnz'><b id='ZqDnz'><form id='ZqDnz'><ins id='ZqDnz'></ins><ul id='ZqDnz'></ul><sub id='ZqDnz'></sub></form><legend id='ZqDnz'></legend><bdo id='ZqDnz'><pre id='ZqDnz'><center id='ZqDnz'></center></pre></bdo></b><th id='ZqDnz'></th></span></q></dt></tr></i><div id='ZqDnz'><tfoot id='ZqDnz'></tfoot><dl id='ZqDnz'><fieldset id='ZqDnz'></fieldset></dl></div>
              <tbody id='ZqDnz'></tbody>

              <small id='ZqDnz'></small><noframes id='ZqDnz'>

                  <bdo id='ZqDnz'></bdo><ul id='ZqDnz'></ul>
                  <tfoot id='ZqDnz'></tfoot>
                • 本文介绍了如何在 Symfony2 配置中添加具有值的数组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想在配置文件 (config.yml) 中添加一个简单的值列表.例如:

                  I would like to add a simple list of values in a configuration files (config.yml). For example :

                  my_bundle:
                      columns: ["col1", "col2"]
                  

                  将节点添加到配置解析器时,它只是失败了:

                  When adding the node to the configuration parser, it simply fails :

                  $rootNode = $treeBuilder->root('my_bundle');
                  $rootNode->arrayNode('columns')->children()->end();
                  

                  这是错误:

                  InvalidConfigurationException: Unrecognized options "0, 1" under "my_bundle.columns"
                  

                  我错过了什么?这甚至可能吗?

                  What am I missing? Is this even possible?

                  推荐答案

                  如果你想实现这样的节点,只需:

                  If you want to achieve a node like this, just do:

                  $rootNode
                      ->children()
                          ->arrayNode('columns')
                              ->prototype('scalar')
                              ->end()
                          ->end()
                      ->end()
                  ;
                  

                  这篇关于如何在 Symfony2 配置中添加具有值的数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                    <tbody id='uGEBS'></tbody>

                      <bdo id='uGEBS'></bdo><ul id='uGEBS'></ul>

                        <tfoot id='uGEBS'></tfoot>
                        <i id='uGEBS'><tr id='uGEBS'><dt id='uGEBS'><q id='uGEBS'><span id='uGEBS'><b id='uGEBS'><form id='uGEBS'><ins id='uGEBS'></ins><ul id='uGEBS'></ul><sub id='uGEBS'></sub></form><legend id='uGEBS'></legend><bdo id='uGEBS'><pre id='uGEBS'><center id='uGEBS'></center></pre></bdo></b><th id='uGEBS'></th></span></q></dt></tr></i><div id='uGEBS'><tfoot id='uGEBS'></tfoot><dl id='uGEBS'><fieldset id='uGEBS'></fieldset></dl></div>

                        <small id='uGEBS'></small><noframes id='uGEBS'>

                          <legend id='uGEBS'><style id='uGEBS'><dir id='uGEBS'><q id='uGEBS'></q></dir></style></legend>