How do I use multiple entries with Zend_Config_Xml?

403 Views Asked by At

I am trying to use multiple entries with Zend_Config_XML, but no luck so far. I have the following structure.

<acl>
<admin>
    <access moudle="module1" controller="controller1" action="action1">
    <access moudle="module2" controller="controller2" action="action2">
    <access moudle="module3" controller="controller3" action="action3">
</admin>
<manager>
    <access moudle="module1" controller="controller1" action="action1">
    <access moudle="module2" controller="controller2" action="action2">
    <access moudle="module3" controller="controller3" action="action3">
</manager>
</acl>

I can't even access to access entries.

Should I use other XML classes to use multiple entries?

2

There are 2 best solutions below

1
On

I've never used XML configs with ZF but it looks like you have a typo in your XML - the attribute name should be module, not moudle.

1
On

The problem is that is not valid XML. You need to close the access tag:

<access moudle="module1" controller="controller1" action="action1" />

And as the other guy who's name I can't remember said, you have a typo in moudle.