[nycphp-talk] __call() in php5?
Adam Maccabee Trachtenberg
adam at trachtenberg.com
Mon Feb 16 13:23:45 EST 2004
On Mon, 16 Feb 2004, jon baer wrote:
> well ... @ the moment just playing around w/ php5 *but* im trying to create
> some "dynamic" objects that are tied to a database where you don't have to
> crank out the schema at first or at all (or at least that is the idea) so
> for example:
>
> $player->setXXX(value) and $player->getXXX() ...
>
> are trapped to something. i can give the option of using internal static
> variables, DB::PEAR, or simplexml just for the sake of testing the object.
For that, you'd just use __get() and __set(). I think __call() will be
used mostly with delegation. I'm still trying to come up with other
good examples. Everything else I have is somewhat trivial.
-adam
--
adam at trachtenberg.com
author of o'reilly's php cookbook
avoid the holiday rush, buy your copy today!
More information about the talk
mailing list