[Xapian-discuss] More than one Index?
Olly Betts
olly at survex.com
Sat Feb 4 04:20:16 GMT 2006
On Mon, Jan 30, 2006 at 02:11:44PM +0000, James Aylett wrote:
> On Mon, Jan 30, 2006 at 01:34:13PM +0000, John Wards wrote:
> > How do I get to allterms_begin() in PHP?
>
> $db = /* construct it here */;
> $ati = $db->allterms_begin();
Because we aren't currently wrapping Xapian classes as PHP classes, that
has to be:
$ati = Database_allterms_begin($db);
It would be much better to be able to wrap as PHP classes, but SWIG
doesn't yet support that for PHP5, and the PHP4 support wasn't quite
working last time I tried (though it's a lot better than it was).
> > I am a bit lost with the convertion from the API to PHP.
>
> Annoyingly, there isn't a documentation file for the PHP bindings in
> the way there is for python. Basically, you just convert object
> references and method calls to the PHP convention - the names are the
> same, almost always.
I've made major improvements to the PHP bindings documentation since the
last release. You can see the latest version here, though beware that
some things aren't true for the previous release (most notably we had
to rename overloaded methods in 0.9.2 and earlier):
http://svn.xapian.org/*checkout*/trunk/xapian-bindings/php/docs/bindings.html
If you have suggestions for further improvements, send them in. Patches
are preferred if possible.
Cheers,
Olly
More information about the Xapian-discuss
mailing list