Do you use _set?

Do you use _set?

am 30.09.2007 09:30:21 von dkfjldfsa

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

ss

Re: Do you use _set?

am 30.09.2007 13:09:51 von ragearc

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

Re: Do you use _set?

am 30.09.2007 14:47:17 von luiheidsgoeroe

On Sun, 30 Sep 2007 09:30:21 +0200, news.telus.net
wrote:
> i don't like the magic function because it limits the ability
> for ide to list all the class variables.

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?

am 30.09.2007 21:22:44 von Michael Fesser

..oO(news.telus.net)

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

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:

$foo->getComponentById('this')->getComponentById('that')->do Something();

With magic:

$foo->this->that->doSomething();

Micha

Re: Do you use _set?

am 01.10.2007 05:37:37 von dkfjldfsa

> $foo->this->that->doSomething();
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 )