mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
28 lines
586 B
PHP
28 lines
586 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()
|
|
{
|
|
return $this->left->isFullTextOnly()
|
|
&& $this->right->isFullTextOnly();
|
|
}
|
|
}
|