[Xapian-discuss] Query::Query() in PHP, also QueryParser::prefixes
James Aylett
james-xapian@tartarus.org
Fri, 28 May 2004 13:27:01 +0100
On Fri, May 28, 2004 at 12:23:14PM +0100, Sam Liddicott wrote:
> > Just tried to do some query building in PHP but came up against a
> > brick wall. The only constructor exposed by SWIG is the first one.
> > SWIG doesn't seem to support operator overloading of constructors.
>
> If you use swig tricks (and I forget what they are now) to give the
> overloaded constructors different names, swig will still realise they are
> constructors and you can invoke them as class methods in php
>
> $new_object=Class::renamed_constructor("blah");
>
> and still get a new instance.
>
> I made it support the default constructor as a class method that returns a
> new instance.
I haven't been able to get shadow classes to work at all ... do you
have some sample code?
J
--
/--------------------------------------------------------------------------\
James Aylett xapian.org
james@tartarus.org uncertaintydivision.org