Bridge with doctrine/orm

Refer to the official documentation on Doctrine’s website.

This bridge provides SQL database querying mechanisms, wrapped in entities, whenever you need to read/write from it.

Read from entities in database

The reader will yield each entity of a specified class, one at a time.

<?php

declare(strict_types=1);

use App\Entity\User;
use Doctrine\Persistence\ManagerRegistry;
use Yokai\Batch\Bridge\Doctrine\ORM\EntityReader;

/** @var ManagerRegistry $managerRegistry */

new EntityReader(
    doctrine: $managerRegistry,
    class: User::class,
);