class QueryFactory in Apigee Edge 8
Factory for creating entity query objects for the Apigee Edge backend.
Hierarchy
- class \Drupal\apigee_edge\Entity\Query\QueryFactory implements QueryFactoryInterface
Expanded class hierarchy of QueryFactory
1 string reference to 'QueryFactory'
1 service uses QueryFactory
File
- src/
Entity/ Query/ QueryFactory.php, line 31
Namespace
Drupal\apigee_edge\Entity\QueryView source
class QueryFactory implements QueryFactoryInterface {
/**
* The namespace of this class, the parent class etc.
*
* @var string[]
*/
protected $namespaces;
/**
* The entity type manager.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* Constructs a QueryFactory object.
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager.
*/
public function __construct(EntityTypeManagerInterface $entity_type_manager) {
$this->entityTypeManager = $entity_type_manager;
$this->namespaces = QueryBase::getNamespaces($this);
}
/**
* {@inheritdoc}
*/
public function get(EntityTypeInterface $entity_type, $conjunction) {
/** @var \Drupal\apigee_edge\Entity\EdgeEntityTypeInterface $entity_type */
$rc = new \ReflectionClass($entity_type
->getQueryClass());
return $rc
->newInstance($entity_type, $conjunction, $this->namespaces, $this->entityTypeManager);
}
/**
* {@inheritdoc}
*/
public function getAggregate(EntityTypeInterface $entity_type, $conjunction) {
throw new QueryException('Aggregation over Apigee Edge entities is not supported.');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
QueryFactory:: |
protected | property | The entity type manager. | |
QueryFactory:: |
protected | property | The namespace of this class, the parent class etc. | |
QueryFactory:: |
public | function |
Instantiates an entity query for a given entity type. Overrides QueryFactoryInterface:: |
|
QueryFactory:: |
public | function |
Instantiates an aggregation query object for a given entity type. Overrides QueryFactoryInterface:: |
|
QueryFactory:: |
public | function | Constructs a QueryFactory object. |