You are here: Re: Do you use _set? « PHP Programming Language « IT news, forums, messages
Re: Do you use _set?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация