Hi Jim
Nothing more than being slightly careless when copy and pasting an
example from Darby's documentation :)
Storing $roleGuest as a new Zend_Acl_Role was only originally there
to use when setting inheritance when defining new roles, but since I
referred to them as strings only... well... yer right! $roleGuest is
a bit redundant in that situation.
I was also keen in the example to explore how the interaction between
user -> model -> auth worked in this example and if people were of
the opinion that this was a more 'correct' strategy.
> Great example but I have two questions. I'm getting a 'Fatal error:
> Can not
> call constructor' any thoughts? What is the point of $roleGuest?
> I'm able to
> just do this
>
> $this->addRole(new Zend_Acl_Role('guest'));
> $this->addRole(new Zend_Acl_Role('member'), 'guest');
> $this->addRole(new Zend_Acl_Role('admin'), 'member');
>
> and everything seems fine. Why do you break out $roleGuest?
>
> The framework is very valuable to me. It is helping me to organize and
> simplify my code while reducing the amount of code I am writing. The
> examples are educating about how to best utilize the framework and
> php in
> general. Keep up the good work and please continue post usage
> examples.
--
Simon Mundy | Director | PEPTOLAB
""" " "" """""" "" "" """"""" " "" """"" " """"" " """""" "" "
202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654
4124
http://www.peptolab.com