85ef13a50aab5d0323ffb5ed21fb6174f0a7d9aa
[yaffs-website] / web / core / lib / Drupal / Core / Entity / Query / QueryFactoryInterface.php
1 <?php
2
3 namespace Drupal\Core\Entity\Query;
4 use Drupal\Core\Entity\EntityTypeInterface;
5
6 /**
7  * Defines an interface for QueryFactory classes.
8  */
9 interface QueryFactoryInterface {
10
11   /**
12    * Instantiates an entity query for a given entity type.
13    *
14    * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
15    *   The entity type definition.
16    * @param string $conjunction
17    *   The operator to use to combine conditions: 'AND' or 'OR'.
18    *
19    * @return \Drupal\Core\Entity\Query\QueryInterface
20    *   An entity query for a specific configuration entity type.
21    */
22   public function get(EntityTypeInterface $entity_type, $conjunction);
23
24   /**
25    * Instantiates an aggregation query object for a given entity type.
26    *
27    * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
28    *   The entity type definition.
29    * @param string $conjunction
30    *   - AND: all of the conditions on the query need to match.
31    *   - OR: at least one of the conditions on the query need to match.
32    *
33    * @return \Drupal\Core\Entity\Query\QueryAggregateInterface
34    *   The query object that can query the given entity type.
35    *
36    * @throws \Drupal\Core\Entity\Query\QueryException
37    */
38   public function getAggregate(EntityTypeInterface $entity_type, $conjunction);
39
40 }