bpzr/entity-adapter

Package provides a flexible bridge between database queries and entity objects

Maintainers

Package info

github.com/bpzr01/entity-adapter

pkg:composer/bpzr/entity-adapter

Statistics

Installs: 271

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

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

This package is auto-updated.

Last update: 2026-03-14 23:14:01 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'],
    );
}