通过遵循这个例子,我已经将我的应用程序设置为使用模块配置xml。
现在,我需要为一个配置键定义一个空数组。等效的php配置文件是:
<?php
return array (
//...the other configurations
'sample' => array(
'empty' => array()
)
);我不知道如何用xml构建它。如果我尝试以下xml,解析器将返回一个空字符串,但我需要一个空数组。
<?xml version="1.0" encoding="UTF-8"?>
<zend-config>
<!-- ...the other configurations -->
<sample>
<empty></empty>
</sample>
</zend-config>有选项可以强制Zend\Config\Factory返回数组而不是字符串吗?
发布于 2013-11-26 18:46:56
你是说这个?
<zend-config>
<sample>
<empty/>
</sample>
</zend-config>https://stackoverflow.com/questions/20220247
复制相似问题