0

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?

David Snabel-Caunt
  • 57,804
  • 13
  • 114
  • 132
Moon
  • 22,195
  • 68
  • 188
  • 269

2 Answers2

1

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.

David Snabel-Caunt
  • 57,804
  • 13
  • 114
  • 132
  • It does not matter actually. "moudle" is just an attribute. it can be anything. My question is that ZF does not parse it. – Moon Mar 21 '10 at 22:29
1

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.

Franco
  • 905
  • 1
  • 7
  • 16
  • Works fine for me: fran@frarch:~/test$ php test.php array(3) { [0]=> array(3) { ["moudle"]=> string(7) "module1" ["controller"]=> string(11) "controller1" ["action"]=> string(7) "action1" } [1]=> array(3) { ["moudle"]=> string(7) "module2" ["controller"]=> string(11) "controller2" ["action"]=> string(7) "action2" } [2]=> array(3) { ["moudle"]=> string(7) "module3" ["controller"]=> string(11) "controller3" ["action"]=> string(7) "action3" } } – Franco Mar 21 '10 at 23:31