2010年12月6日星期一

[fw-mvc] [Zend_Config] Questions about heritage

Hi there :)

I would like to know if there is a solution to "merge" parents branches with
children ones.

I explain by examples :

My XML :

<?xml version="1.0"?>
<files xmlns:zf="http://framework.zend.com/xml/zend-config-xml/1.0/">
<common>
<files>
<file><zf:const zf:name="ARBO_JS" />test1.js</file>
</files>
</common>
<index zf:extends="common">
<files>
<file><zf:const zf:name="ARBO_JS" />test2.js</file>
<file><zf:const zf:name="ARBO_JS" />test3.js</file>
</files>
</index>
</files>

Result expected :
array(
'http://www.example.com/js/test1.js',
'http://www.example.com/js/test2.js',
'http://www.example.com/js/test3.js',
);

Result actual :
array(
'http://www.example.com/js/test2.js',
'http://www.example.com/js/test3.js',
);

Zend_Config_Xml doesn't merge my parent nodes but overidde them.

Is there a solution to have my result expected ? :)

Thanks folks :)

没有评论: