2009年6月4日星期四

Re: [fw-mvc] get and set accessors

Side note that might help clarify things here...

The answer to your question is that you would know based on project
documentation, coding style, or just simply because you're the only
one doing the coding.

If you're asking the question as a way of making a point, that you
think magic methods shouldn't be used... All I can really do is share
my personal opinion. It seems like I should be using the same
standards that are applied to ZF for all of my work, regardless of
whether the work is personal or professional. And that's mainly
because I don't want to build bad habits during personal projects...
It seems like I really shouldn't be relying on magic methods...

-Ed


On Thu, Jun 4, 2009 at 3:38 PM, Ed Lazor<edlazor@internetarchitects.biz> wrote:
> On Thu, Jun 4, 2009 at 3:20 PM, Hector Virgen<djvirgen@gmail.com> wrote:
>> I understand the benefits of magic methods, but how will I know if my object
>> even has them (or which properties can be set) if it's not in the interface?
>
> You put the magic methods in a basic model class and then extend
> everything from there.
>
> Did you understand what I said about why you wouldn't put magic
> methods in the interface?
>
> -Ed
>

没有评论: