Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 18.118.140.120
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
wb /
vendor /
doctrine /
collections /
docs /
en /
Delete
Unzip
Name
Size
Permission
Date
Action
derived-collections.rst
738
B
-rw-rw-r--
2022-08-18 05:44
expression-builder.rst
3.46
KB
-rw-rw-r--
2022-08-18 05:44
expressions.rst
2.17
KB
-rw-rw-r--
2022-08-18 05:44
index.rst
7.94
KB
-rw-rw-r--
2022-08-18 05:44
lazy-collections.rst
740
B
-rw-rw-r--
2022-08-18 05:44
sidebar.rst
122
B
-rw-rw-r--
2022-08-18 05:44
Save
Rename
Lazy Collections ================ To create a lazy collection you can extend the ``Doctrine\Common\Collections\AbstractLazyCollection`` class and define the ``doInitialize`` method. Here is an example where we lazily query the database for a collection of user records: .. code-block:: php use Doctrine\DBAL\Connection; class UsersLazyCollection extends AbstractLazyCollection { /** @var Connection */ private $connection; public function __construct(Connection $connection) { $this->connection = $connection; } protected function doInitialize() : void { $this->collection = $this->connection->fetchAll('SELECT * FROM users'); } }