Moon
Moon

Reputation: 22565

How do I use multiple entries with Zend_Config_Xml?

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?

Upvotes: 0

Views: 388

Answers (2)

Franco
Franco

Reputation: 905

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.

Upvotes: 1

David Snabel-Caunt
David Snabel-Caunt

Reputation: 58361

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.

Upvotes: 1

Related Questions