mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
26 lines
538 B
PHP
26 lines
538 B
PHP
<?php
|
|
|
|
namespace Alchemy\Phrasea\SearchEngine\Elastic\AST;
|
|
|
|
class InExpression extends Node
|
|
{
|
|
protected $keyword;
|
|
protected $expression;
|
|
|
|
public function __construct(KeywordNode $keyword, $expression)
|
|
{
|
|
$this->keyword = $keyword;
|
|
$this->expression = $expression;
|
|
}
|
|
|
|
public function getQuery()
|
|
{
|
|
return $this->expression->getQuery($this->keyword->getValue());
|
|
}
|
|
|
|
public function __toString()
|
|
{
|
|
return sprintf('(%s IN %s)', $this->expression, $this->keyword);
|
|
}
|
|
}
|