Files
Phraseanet/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/BinaryOperator.php
Mathieu Darse 0bbd35dc02 AST revamp
2014-11-06 19:06:34 +01:00

33 lines
662 B
PHP

<?php
namespace Alchemy\Phrasea\SearchEngine\Elastic\AST;
abstract class BinaryOperator extends Node
{
protected $left;
protected $right;
protected $operator = 'BIN_OP';
public function __construct(Node $left, Node $right)
{
$this->left = $left;
$this->right = $right;
}
public function __toString()
{
return sprintf('(%s %s %s)', $this->left, $this->operator, $this->right);
}
public function isFullTextOnly()
{
foreach ($this->members as $member) {
if (!$member->isFullTextOnly()) {
return false;
}
}
return true;
}
}