Do you use _set?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
i don't like the magic function because it limits the ability
for ide to list all the class variables.  


Re: Do you use _set?

I never use set. I create my own functions that deal only with their
piece of variables.

Re: Do you use _set?

Quoted text here. Click to load it

I use is sparingly, when appropriate. Then again I never use an IDE, and  
documenting this 'magic' variable is a piece of cake...
Rik Wasmus

Re: Do you use _set?


Quoted text here. Click to load it

I don't use __set() at the moment, but its counterpart __get(). In my
own component framework it makes it very convenient to directly access
subcomponents without having to explicitly call a function everytime:

Without magic:


With magic:



Re: Do you use _set?

Quoted text here. Click to load it
The thing I don't like about is in IDE "this" and "that" are not going to be
in the autocomplete list. I just don't like to go back and forth
btwn class files.( maybe only me ..)

Most of people working with php don't use ide?

When i work with java in eclipse, it gives you option to "generate setter  
and getter"
with class variables selected. Within PDT, i don't get the feature( i guess  
i have to make one by myself )

Site Timeline