"Fossies" - the Fresh Open Source Software Archive

Member "drupal-8.9.10/core/lib/Drupal/Core/Entity/Query/Null/QueryFactory.php" (26 Nov 2020, 954 Bytes) of package /linux/www/drupal-8.9.10.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "QueryFactory.php" see the Fossies "Dox" file reference documentation.

    1 <?php
    2 
    3 namespace Drupal\Core\Entity\Query\Null;
    4 
    5 use Drupal\Core\Entity\EntityTypeInterface;
    6 use Drupal\Core\Entity\Query\QueryBase;
    7 use Drupal\Core\Entity\Query\QueryFactoryInterface;
    8 
    9 /**
   10  * Provides a factory for creating entity query objects for the null backend.
   11  */
   12 class QueryFactory implements QueryFactoryInterface {
   13 
   14   /**
   15    * The namespace of this class, the parent class etc.
   16    *
   17    * @var array
   18    */
   19   protected $namespaces;
   20 
   21   /**
   22    * Constructs a QueryFactory object.
   23    */
   24   public function __construct() {
   25     $this->namespaces = QueryBase::getNamespaces($this);
   26   }
   27 
   28   /**
   29    * {@inheritdoc}
   30    */
   31   public function get(EntityTypeInterface $entity_type, $conjunction) {
   32     return new Query($entity_type, $conjunction, $this->namespaces);
   33   }
   34 
   35   /**
   36    * {@inheritdoc}
   37    */
   38   public function getAggregate(EntityTypeInterface $entity_type, $conjunction) {
   39     return new Query($entity_type, $conjunction, $this->namespaces);
   40   }
   41 
   42 }