Do you use _set?
am 30.09.2007 09:30:21 von dkfjldfsai don't like the magic function because it limits the ability
for ide to list all the class variables.
ss
i don't like the magic function because it limits the ability
for ide to list all the class variables.
ss
I never use set. I create my own functions that deal only with their
piece of variables.
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
..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
> $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 )