summaryrefslogtreecommitdiff
path: root/vendor/doctrine/collections/docs/en/lazy-collections.rst
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2026-10-18 00:08:23 +0200
committerpolo <ordipolo@gmx.fr>2026-10-18 00:10:03 +0200
commit05e38eadbeb3de19e5b26003c2b401e00bb71df4 (patch)
treecf48350b69cfce92de6f3a0e03eb0876931c7077 /vendor/doctrine/collections/docs/en/lazy-collections.rst
parent32843e50aa981f190bdb4fbc9adbeacc06fdf775 (diff)
downloadAppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.tar.gz
AppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.tar.bz2
AppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.zip
sortie de vendor du dépôt, oubli dans config-template.ini
Diffstat (limited to 'vendor/doctrine/collections/docs/en/lazy-collections.rst')
-rw-r--r--vendor/doctrine/collections/docs/en/lazy-collections.rst26
1 files changed, 0 insertions, 26 deletions
diff --git a/vendor/doctrine/collections/docs/en/lazy-collections.rst b/vendor/doctrine/collections/docs/en/lazy-collections.rst
deleted file mode 100644
index b9cafb6..0000000
--- a/vendor/doctrine/collections/docs/en/lazy-collections.rst
+++ /dev/null
@@ -1,26 +0,0 @@
1Lazy Collections
2================
3
4To create a lazy collection you can extend the
5``Doctrine\Common\Collections\AbstractLazyCollection`` class
6and define the ``doInitialize`` method. Here is an example where
7we lazily query the database for a collection of user records:
8
9.. code-block:: php
10 use Doctrine\DBAL\Connection;
11
12 class UsersLazyCollection extends AbstractLazyCollection
13 {
14 /** @var Connection */
15 private $connection;
16
17 public function __construct(Connection $connection)
18 {
19 $this->connection = $connection;
20 }
21
22 protected function doInitialize() : void
23 {
24 $this->collection = $this->connection->fetchAll('SELECT * FROM users');
25 }
26 }