> $dataList * @return EntityCollection */ public function create(?string $entityType = null, array $dataList = []): EntityCollection { return new EntityCollection($dataList, $entityType, $this->entityManager->getEntityFactory()); } /** * Create from an SQL. * * @return SthCollection */ public function createFromSql(string $entityType, string $sql): SthCollection { return SthCollection::fromSql($entityType, $sql, $this->entityManager); } /** * Create from a query. * * @return SthCollection */ public function createFromQuery(Select $query): SthCollection { return SthCollection::fromQuery($query, $this->entityManager); } /** * Create EntityCollection from SthCollection. * * @template TEntity of Entity * @param SthCollection $sthCollection * @return EntityCollection */ public function createFromSthCollection(SthCollection $sthCollection): EntityCollection { /** @var EntityCollection */ return EntityCollection::fromSthCollection($sthCollection); } }