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
Requires
- php: ^8.2
- doctrine/dbal: ^4.0
Requires (Dev)
- phpunit/phpunit: ^11.1
- symfony/var-dumper: ^7.0
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'],
);
}