bpzr/entity-adapter

Package provides a flexible bridge between database queries and entity objects

Installs: 193

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/bpzr/entity-adapter

v1.0.1 2025-03-14 21:06 UTC

This package is auto-updated.

Last update: 2026-01-14 22:46:05 UTC


README

WIP

example usage:

/** @return array<int, ProductEntity> ID => product */
public function findProductsByIds(array $productIds): array
{
    return $this->entityAdapter->createAll(
        ProductEntity::class,
        $this->connection->executeQuery('SELECT * FROM product WHERE id IN (?)', [$productIds], [ArrayParameterType::INTEGER]),
        [ProductEntity::class, 'getId'],
    );
}