You mean this?
<zend-config>
<sample>
<empty/>
</sample>
</zend-config>
سؤال
I have set up my application to use a module configuration xml, by following this example.
Now I need to define an empty array for one configuration key. The equivalent php configuration file would be:
<?php
return array (
//...the other configurations
'sample' => array(
'empty' => array()
)
);
I can't figure out how to build this in xml. If I try the following xml the parser returns me an empty string, but I need an empty array.
<?xml version="1.0" encoding="UTF-8"?>
<zend-config>
<!-- ...the other configurations -->
<sample>
<empty></empty>
</sample>
</zend-config>
Is there an option where i can force Zend\Config\Factory to return an array instead of a string?
المحلول
You mean this?
<zend-config>
<sample>
<empty/>
</sample>
</zend-config>