-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It would be helpful when you could provide a dump of the generated
Zend_Config object. Additionally, it doesn't make any sense to set an
extend on the root node of the configuration.
...................................
:  ___   _   ___ ___ ___ _ ___    :
: |   \ /_\ / __| _ \ _ (_)   \   :
: | |) / _ \\__ \  _/   / | |) |  :
: |___/_/:\_\___/_| |_|_\_|___/   :
:........:........................:
: Web    : http://www.dasprids.de :
: E-mail : m...@dasprids.de       :
: Jabber : jab...@dasprids.de     :
: ICQ    : 105677955              :
:........:........................:


admirau schrieb:
> How to save Zend_Navigation to XML?
> 
> I tried like this:
> 
> $navigation = new Zend_Navigation(new Zend_Config_Xml(APPLICATION_PATH .
> '/configs/navigation/main.xml', 'main'));
>         
> $config = new Zend_Config($navigation->toArray());
> $config->setExtend('main');
>         
> $writer = new Zend_Config_Writer_Xml();
> $writer->write(APPLICATION_PATH . '/configs/navigation/nav2.xml', $config);
> 
> 
> I get: 
> Catchable fatal error: Object of class Zend_Config could not be converted to
> string in C:\Users\user\www\library\Zend\Config\Writer\Xml.php on line 182
> 
> Here is an similar issue:
> http://framework.zend.com/issues/browse/ZF-5643?focusedCommentId=31247#action_31247
> 
> My main.xml:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <config>
>     <main>
>         <home>
>             <label>Home page</label>
>             <module>default</module>
>             <controller>index</controller>
>             <action>index</action>
>             <order>-100</order>
>         </home>
> 
>         <projects>
>             <label>Projects</label>
>             <uri></uri>
>             <pages>
>                 <list>
>                     <label>List projects</label>
>                     <module>default</module>
>                     <controller>projects</controller>
>                     <action>list</action>
>                 </list>
>                 <new>
>                     <label>New project</label>
>                     <module>default</module>
>                     <controller>projects</controller>
>                     <action>new</action>
>                 </new>
>                 <process>
>                     <label>Process next URL</label>
>                     <module>default</module>
>                     <controller>projects</controller>
>                     <action>process</action>
>                 </process>
>             </pages>
> 
>         </projects>
> 
>     </main>
> </config>
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpoO5EACgkQ0HfT5Ws789BbCQCgrSFwN1pROi9NJPXOFWNw4CPK
fKYAoMFk4DvMSJQoIYjVDSMGlmU7gOdJ
=q+3b
-----END PGP SIGNATURE-----

Reply via email to