#zend

5 bookmarks tagged with #zend · RSS Feed · ← All Tags

PHP Advent 2009 / You Don’t Need All That

http://phpadvent.org/2009/you-dont-need-all-that-by-marcel-esser
"The point I am trying to make is we’re getting a little crazy with our architectures. These days, we write PHP just like Java, but it’s not Java. It works completely differently, and we shouldn’t try to force patterns that aren’t necessarily the best fit. You don’t need all that. Just write good code."

Ralph Schindler - Dynamic Assertions for Zend_Acl in ZF

http://ralphschindler.com/2009/08/13/dynamic-assertions-for-zend_acl-in-zf
"In plain English, what developers want to be able to do is be able to design assertions that can accept application models that implement the Resource or Role interface, and be able to apply some dynamic or custom logic to assess whether or not the given role has access to the given resource. ... For the purposes of this example, we’ll take a simple concept: a user needs to be able to only edit their own blog post. The user in this case, would be our applications model for users. The actual class will implement the Zend_Acl_Role_Interface. We will also have a BlogPost model which will serve as the resource in question, thus implementing the Zend_Acl_Resource_Interface"