Files
Phraseanet/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/KeywordNode.php
2014-08-25 10:25:38 +02:00

29 lines
500 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);
}
}