Op 18-07-11 17:05, Kyle Spraggs schreef:
Does anyone have any input on how I should handle filters? I was thinking of
doing the following:

get($field) - applies filtering to the field

// user getter
getEmail() {
        return $this->get('email');
}

This allows users to have the flexibility of choosing whether or not to
include automated filtering for getters/setters. I really dislike magic
methods (__get/__set) so I'd prefer not to use them if at all possible.
Magic getters and setters are considered a great feature by others, including me. Zend_Framework uses their magic extensively. If implemented well, these functions offert great possibilities. I do not think personal dislike is a good reason not to use them if you plan to develop for a large community.
-Bart


--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to