open_muscat; Fatal error: Class declarations may not be nested in /var/www/html/xapian/test.php on line 3
| From: | Sam Liddicott | Date: | Mon, 11 Feb 2002 16:11:54 +0000 |
| Subject: | open_muscat; Fatal error: Class declarations may not be nested in /var/www/html/xapian/test.php on line 3 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-79940@lists.php.net to get a copy of this message | ||
I've got a first revision of the php module for open_muscat (now called
xapian).
I used swig to generate this.
Swig works by declaring a class in the C code and then having a load of
methods of this class to do the work, and then some php classes which shadow
the C classes but use the new methods of the secret single class to do the
actual work.
Like:
...
$this->_c_ptr=xapianc::new_OmQieryTerm("hi",0,0);
...
return xapianc::OmQuery_get_description($this->_c_ptr);
and all that kind of thing;
The problem is merely loading the xapian module gives this error if even the
simplest class is declared (with no include files at all)
Fatal error: Class declarations may not be nested in
/var/www/html/xapian/test.php on line 3
The same tiny class definitions work fine if the xapian module does not
load.
I can't find decent docs on internal class declarations but obviously it has
not been "closed"; how might I go about doing this?
Sam