From 05e38eadbeb3de19e5b26003c2b401e00bb71df4 Mon Sep 17 00:00:00 2001 From: polo Date: Sun, 18 Oct 2026 00:08:23 +0200 Subject: =?UTF-8?q?sortie=20de=20vendor=20du=20d=C3=A9p=C3=B4t,=20oubli=20?= =?UTF-8?q?dans=20config-template.ini?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/doctrine/orm/src/LazyCriteriaCollection.php | 96 ---------------------- 1 file changed, 96 deletions(-) delete mode 100644 vendor/doctrine/orm/src/LazyCriteriaCollection.php (limited to 'vendor/doctrine/orm/src/LazyCriteriaCollection.php') diff --git a/vendor/doctrine/orm/src/LazyCriteriaCollection.php b/vendor/doctrine/orm/src/LazyCriteriaCollection.php deleted file mode 100644 index ca67914..0000000 --- a/vendor/doctrine/orm/src/LazyCriteriaCollection.php +++ /dev/null @@ -1,96 +0,0 @@ - - * @implements Selectable - */ -class LazyCriteriaCollection extends AbstractLazyCollection implements Selectable -{ - private int|null $count = null; - - public function __construct( - protected EntityPersister $entityPersister, - protected Criteria $criteria, - ) { - } - - /** - * Do an efficient count on the collection - */ - public function count(): int - { - if ($this->isInitialized()) { - return $this->collection->count(); - } - - // Return cached result in case count query was already executed - if ($this->count !== null) { - return $this->count; - } - - return $this->count = $this->entityPersister->count($this->criteria); - } - - /** - * check if collection is empty without loading it - */ - public function isEmpty(): bool - { - if ($this->isInitialized()) { - return $this->collection->isEmpty(); - } - - return ! $this->count(); - } - - /** - * Do an optimized search of an element - * - * @param mixed $element The element to search for. - * - * @return bool TRUE if the collection contains $element, FALSE otherwise. - */ - public function contains(mixed $element): bool - { - if ($this->isInitialized()) { - return $this->collection->contains($element); - } - - return $this->entityPersister->exists($element, $this->criteria); - } - - /** @return ReadableCollection&Selectable */ - public function matching(Criteria $criteria): ReadableCollection&Selectable - { - $this->initialize(); - assert($this->collection instanceof Selectable); - - return $this->collection->matching($criteria); - } - - protected function doInitialize(): void - { - $elements = $this->entityPersister->loadCriteria($this->criteria); - $this->collection = new ArrayCollection($elements); - } -} -- cgit v1.2.3