This.

-Matt

On Mon, May 19, 2008 at 12:37 PM, Ralph Schindler <[EMAIL PROTECTED]>
wrote:

> Actually, in the case you bring up, I think it depends on the goals of the
> object which influence its api.  When you talk about having getters and
> setters, you are typically modifying the STATE of an object...
>
> In other words, you are actually further defining the objects role.
>
> In you example, adding setEmail($email) to the $validator is further
> defining the role of the $validator to be a 'a validator specifically for
> $email'.  This would change the role from
>
> 'one validator for all email addresses' to
> 'one validator for one email address'
>
> Semantically speaking, whatever the actual email address is doesn't add any
> meaningfulness to the validator object itself, so having these accessors
> doesn't provider any further value-added to the api.
>
> In a very round about way, thats the best way I could explain it ;)
>
> -Ralph

Reply via email to