#488 closed defect (fixed)
Enable directors for PHP
Reported by: | Olly Betts | Owned by: | Olly Betts |
---|---|---|---|
Priority: | normal | Milestone: | 1.2.6 |
Component: | Xapian-bindings (PHP) | Version: | SVN trunk |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Operating System: | All |
Description
SWIG now supports directors for PHP, but they have a bug which prevents use with Xapian. Here is the patch of the work so far - once the SWIG bug is fixed, this provides most of what is needed on the Xapian side.
Marking for 1.2.x as this doesn't make incompatible changes, just enables features which aren't currently supported for PHP.
Attachments (2)
Change History (8)
by , 14 years ago
Attachment: | xapian-php-matchdecider.patch added |
---|
comment:1 by , 14 years ago
Also, this older patch enables Xapian::Sorter
:
http://oligarchy.co.uk/xapian/patches/xapian-php-bindings-directors.patch
comment:2 by , 14 years ago
Component: | Xapian-bindings → Xapian-bindings (PHP) |
---|
comment:3 by , 13 years ago
Milestone: | 1.2.x → 1.2.6 |
---|---|
Status: | new → assigned |
PHP directors now pretty much work, so I've applied the patch above and committed it in r15487.
There's still one wrinkle - objects passed to director methods called from C++ don't currently get a PHP class wrapper (just the raw resource is passed), so you have to wrap them yourself right now. So I'm leaving this ticket open for this remaining problem.
by , 13 years ago
Attachment: | php-generated-code-director-fix.patch added |
---|
Example of the changes we want to make to the generated code
comment:4 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in SWIG. Special handling removed from smoketest.php and simplematchdecider.php5 in r15518.
comment:5 by , 13 years ago
Really happy to see this happening!
Juste a detail : I noticed that simplematchdecider.php5 is using php short tags (<? instead of <?php) which is not good practice and prevents trac hightlighting.
comment:6 by , 13 years ago
OK, I fixed the short tag in r15547 - thanks for pointing that out.
I think I must have managed to delete the "php" there by accident somehow, as I based the example on one of the existing PHP examples, which all have non-short tags at the start.
patch which enables directors and adds a feature test