I've been looking at use the PHP director support in Xapian. This uncovered a
couple of bugs.
One was easy to fix - we were using the C++ method name instead of the PHP one,
which for example matters if there's a %rename of a director method.
The second I'm struggling to see a sane fix for. If an object is passed to a
director method which the user has subclassed in PHP, then the PHP method gets
passed a resource instead of a resource wrapped in a PHP class.
We need to wrap before we call the method, so the options seem to be to do it
in the C++ wrapper before we call (which I don't know how to do) or to generate
a PHP5 wrapper function which take the $this pointer and the resource and calls
the method on $this with any/all object parameters wrapped.
Any better ideas?