-- Luke Mackenzie <[EMAIL PROTECTED]> wrote
(on Tuesday, 22 May 2007, 07:13 PM +0100):
> Thanks for your reply.
>
> changing this line:
>
> $index = new Zend_Search_Lucene($indexPath, true);
>
> to $index = new Zend_Search_Lucene::create($indexPath, true);
>
> or
>
> $index = new Zend_Search_Lucene::create($indexPath);
>
> generates that error.
Drop the 'new' keyword in each; you're calling a static method, not
instantiating directly. Use:
$index = Zend_Search_Lucene::create($indexPath, true);
> Alexander Veremyev wrote:
>
> Hi,
>
> Yes, old style constructors still work. Code is only more readable with
> create() and open() methods.
>
> Could I ask you to give piece of code which generates this error?
>
> With best regards,
> Alexander Veremyev.
>
> lukemack wrote:
>
> Thanks for your reply. I did try using those two methods in the way
> you
> describe but both generated errors:
>
> PHP Parse error: syntax error, unexpected T_STRING, expecting
> T_VARIABLE or
> '$'
>
> I personally couldn't see anything wrong with the syntax but I
> eventually
> got the code working without those methods.
>
>
>
--
Matthew Weier O'Phinney
PHP Developer | [EMAIL PROTECTED]
Zend - The PHP Company | http://www.zend.com/