[Xapian-discuss] Writing a MatchDecider and exposing it to PHP

Olly Betts olly at survex.com
Thu Mar 29 04:14:03 BST 2012


On Fri, Mar 23, 2012 at 08:19:44AM +0000, Paul Dixon wrote:
> That might be fine, but I can't seem to get the Xapian PHP bindings to
> recognize that I'm trying to pass a MatchDecider. So, I was wondering if by
> making it a 'real' PHP class I could somehow allow it to be recognized as a
> valid MatchDecider.

Is the PHP wrapper class you get a subclass of XapianMatchDecider?

If not, does changing that by hand in the generated wrapper help?

What's the resource in the $_Cptr look like compared to that of a
XapianValueSetMatchDecider?  You probably want to look with var_dump()
or something.

> I could probably get around this by making a special build of Xapian and my
> decider and regenerating the bindings from that, but if possible I'd rather
> keep it separate.

It would be great to be able to support wrapping custom C++ subclasses
like this (and not just for PHP) but it isn't something that anyone has
looked at before as far as I know.

Cheers,
    Olly



More information about the Xapian-discuss mailing list