[Xapian-discuss] php bindings

Olly Betts olly at survex.com
Tue Mar 7 13:10:32 GMT 2006

On Tue, Mar 07, 2006 at 06:19:53PM +0530, durga bidaye wrote:
> I m a newbie here . i have used xapian with c++. now i wanna use php. i
> installed the bindings and went thru the docs. the examples given are
> command line ones. i wanna create an application where search string is
> taken thru a form, from  a user. i wud like a example of a pgm which runs
> in  the browser( not on the command line).

We don't currently have such an example, but reading input from a form
in PHP isn't at all Xapian specific and you can find thousands of
examples of how to do it on the web, e.g.:


> n another doubt i have is whether all the classes that were
> available fr C++ are of no use to php? or only a few classes had to be
> modified fr bindings pakage? rest of them are available fr use by php? if
> not then where is the description fr classes used in bindings?

Did you read the PHP bindings documentation?  See
php/docs/bindings.html in xapian-bindings.

Pretty much all classes and methods are wrapped in PHP.  SWIG doesn't
currently allow you to make a PHP subclass of a wrapped C++ class and
pass it into C++, without which a couple of classes (e.g. MatchDecider)
are pointless so not wrapped.  And we don't currently wrap the
Xapian::Error classes (because PHP4 doesn't support exceptions).

And sometimes a new class/method doesn't get wrapped right away, though
I try to keep everything in step.  Generally Java and Perl lag more
because it requires more work to add a wrapper for those.

If you find a class or method which isn't wrapped and there's not
documented reason, report it and we'll fix the situation.


More information about the Xapian-discuss mailing list