Posted by Michael Fesser on 09/30/07 19:22
..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')->doSomething();
With magic:
$foo->this->that->doSomething();
Micha
Navigation:
[Reply to this message]
|