mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
29 lines
501 B
PHP
29 lines
501 B
PHP
<?php
|
|
|
|
namespace Alchemy\Phrasea\SearchEngine\Elastic\AST;
|
|
|
|
class KeywordNode extends Node
|
|
{
|
|
protected $keyword;
|
|
|
|
public function __construct($keyword)
|
|
{
|
|
$this->keyword = $keyword;
|
|
}
|
|
|
|
public function getValue()
|
|
{
|
|
return $this->keyword;
|
|
}
|
|
|
|
public function getQuery()
|
|
{
|
|
throw new \LogicException("A keyword can't be converted to a query.");
|
|
}
|
|
|
|
public function __toString()
|
|
{
|
|
return sprintf('<%s>', $this->keyword);
|
|
}
|
|
}
|