Files
Phraseanet/lib/Alchemy/Phrasea/SearchEngine/Elastic/AST/CollectionExpression.php
2015-03-17 19:45:24 +01:00

34 lines
675 B
PHP

<?php
namespace Alchemy\Phrasea\SearchEngine\Elastic\AST;
use Alchemy\Phrasea\SearchEngine\Elastic\Search\QueryContext;
class CollectionExpression extends Node
{
private $collectionName;
public function __construct($collectionName)
{
$this->collectionName = $collectionName;
}
public function buildQuery(QueryContext $context)
{
$query = array();
$query['term']['collection_name'] = $this->collectionName;
return $query;
}
public function getTermNodes()
{
return array();
}
public function __toString()
{
return sprintf('<collection:%s>', $this->collectionName);
}
}