Commit Graph

13 Commits

Author SHA1 Message Date
Andrei Zmievski
727ef4b94f Ack, apparently in statically linked-in extensions we have to clean the
hash of overloaded classes on request shutdown. Also, added some fold
markers and rearranged some defines.
2001-12-12 02:27:49 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Andrei Zmievski
b197b8d104 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.
2001-12-11 04:41:15 +00:00
Andrei Zmievski
0c509e5cf8 Modified __call() handler to accept a byref return value parameter that
should be filled in. The __call() handler is now supposed to return true
or false, depending on whether it was successful or not.
2001-12-10 17:20:04 +00:00
Stig Bakken
f22f8adedd * use macros in error messages 2001-12-09 22:39:24 +00:00
Andrei Zmievski
36c4708a84 - Only destroy the current object if it was received from the __get() handler.
- Changed the way method arguments are passed to __call() handler. They are
  now encapsulated inside of an array, which makes it easier to pass them
  to call_user_func_array().
2001-12-09 04:28:23 +00:00
Andrei Zmievski
7b7f46aa2d - Fix memory leak when accessing undefined index or property.
- Only invoke call_get_handler() on an object in the chain if it's overloaded.
2001-12-07 22:03:19 +00:00
Andrei Zmievski
480d2b5624 Make sure refcount is 1 on stack zval. 2001-12-07 14:30:55 +00:00
Andrei Zmievski
9a1f3b48a9 Add fold markers in strategic places and improve MINIT function a bit. 2001-12-07 06:15:02 +00:00
Andrei Zmievski
ecd484ac21 If the method exists in object's function table, call it directly without
using __call() handler.
2001-12-07 06:08:15 +00:00
Andrei Zmievski
9789e43af1 Support overloaded method calls via __call(). 2001-12-07 05:46:02 +00:00
Andrei Zmievski
fcd83424cf Add todo item. 2001-11-16 15:04:12 +00:00
Andrei Zmievski
88d4de1da9 Adding user-space object overloading extension. 2001-10-15 20:32:56 +00:00