-1
我有這個xml文件創建一個容器, 如果我想創建一個數據庫保存這個項目,並從數據庫創建容器 我應該怎麼做?zend框架導航
<?xml version="1.0" encoding="utf-8"?>
<config>
<nav>
<logout>
<label>logout</label>
<controller>authentication</controller>
<action>logout</action>
<resource>logout</resource>
</logout>
<login>
<label>login</label>
<controller>authentication</controller>
<action>login</action>
<resource>login</resource>
</login>
<test>
<label>test</label>
<uri>#</uri>
<resource>test</resource>
<pages>
<list>
<label>list</label>
<controller>tset</controller>
<action>listtest</action>
</list>
<archive>
<label>archive</label>
<controller>myarchive</controller>
<action>archive</action>
</archive>
</pages>
</test>
</nav>
</config>
和bootsrap
$navContainerConfig = new Zend_Config_Xml(APPLICATION_PATH . 'navigation.xml', 'nav');
$navContainer = new Zend_Navigation($navContainerConfig);