Files
Phraseanet/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/KeywordNode.php
2014-09-22 16:58:50 +02:00

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);
}
}