Files
core/src/Storage/QueryInterface.php
2019-10-15 17:27:20 +02:00

48 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace Bolt\Storage;
use Doctrine\ORM\QueryBuilder;
/**
* Interface that defines minimum functionality of a Bolt Query class.
*
* The goal of a query is to store select and filter parameters that can be
* used to create a relevant SQL expression.
*/
interface QueryInterface
{
/**
* Builds the query and returns an instance of QueryBuilder.
*/
public function build();
/**
* Returns the current instance of QueryBuilder.
*/
public function getQueryBuilder(): QueryBuilder;
public function __toString(): string;
public function getIndex(): int;
public function incrementIndex(): void;
/**
* Returns the content type this query is executing on.
*/
public function getContentType(): string;
/**
* Returns the value of a parameter by key name.
*/
public function getParameter(string $key);
/**
* Sets the value of a parameter by key name.
*/
public function setParameter(string $key, $value): void;
}