]> granicus.if.org Git - php/commit
This commit implements property-specific accessors.
authorAndrei Zmievski <andrei@php.net>
Tue, 11 Dec 2001 04:41:15 +0000 (04:41 +0000)
committerAndrei Zmievski <andrei@php.net>
Tue, 11 Dec 2001 04:41:15 +0000 (04:41 +0000)
commitb197b8d104cdc0d6bc1b57bed60b3d13caf0d62b
treee3d704cf7c4bd19dd8646b5295d46edbd2b78f79
parent84eaf5e1c89c80d4bd22ec3f4cbc9c3d8b372b67
This commit implements property-specific accessors.

When overload() is called, it not only scans for general handlers, but
also for any methods beginning with __get_ and __set_ and saves a list of
them. Then when a property is accessed, e.g. $obj->x, the extension will first
check whether __get_x() is available, and will call it if it is, otherwise
it will invoke the general __get() handler.
ext/overload/overload.c
ext/overload/php_overload.h