bpzr/实体适配器

该软件包提供了一个数据库查询和实体对象之间的灵活桥梁

v1.0.0 2024-08-02 21:16 UTC

This package is auto-updated.

Last update: 2024-09-22 18:12:19 UTC


README

工作进度

示例用法

/** @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'],
    );
}