Call to undefined method FSphinx\MultiFieldQuery::toString() [two underscores]
syrsly opened this issue · comments
Syrsly commented
This is more or less just me bickering about underscores. I didn't notice them for a while. It should be two underscores before toString function to make it work. This function should be renamed to something easier to figure out, because those two underscores really threw me for a loop!
Chris Heng commented
__toString() is a PHP "magic method":
http://www.php.net/manual/en/language.oop5.magic.php#language.oop5.magic.tostring
So you don't actually need to explicitly call __toString():
$query = new MultiFieldQuery();
$query->parse('@year 1974');
echo $query;