On Tuesday 18 September 2007, Andrew Ballard wrote:
> > I'm guessing that the answer to all of my questions is some how
> > wrapped up in visibility and overloading. Unfortunately I cannot find
> > any resource that documents the interactions. TIA.
>
> As I understand it, the __get and __set do
> 1) It seems that the getter and setter are not called on every single
> call. For example, if I do the following:
>
> $bar = new foo;
> $bar->x = 'x';
>
> There is no output. I would expect to see "Setting $this->x to x."
> Another example:
>
> $bar = new foo;
> $bar->y = 'y';
> echo $bar->y;
>
I've been doing a bunch of reading about objects and overloading in
PHP5, but I've got a couple of questions that I can't seem to find the
answer to online. Suppose the following code in PHP5.2.4:
$name to $val...\n";
$this->{$name} = $val;
}
public functi
3 matches
Mail list logo