Well, for instance, you could have the __get and __set functions execute a
SQL query or go to a file or whatever. The point, as it seems to me anyway,
is to enable a potentially complex internal implementation be exposed with a
simple interface. Now as for the implications of that, it's debatable.
Hello,
I realize this stuff isn't set in stone yet, but might I eventually expect
the following to make two assignments rather than one?
$name = $value;
return true;
}
}
overload('overload_test');
$t = new overload_test;
$t->a = 'Foo';
$t->b[0] = 'Bar';
print_r($t);
?>
Output:
__s
What is the point of overloading an object again?
> Hello,
>
> I realize this stuff isn't set in stone yet, but might I eventually
> expect the following to make two assignments rather than one?
>
>
> class overload_test
> {
>function __set($name, $value) {
>echo "__set($name, $value)
can you do method overloading in php as you can in java?
Javier
_
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
--
PHP General Mailing List (http://www.php.net/)
T
4 matches
Mail list logo