repository = new Repository($dbDriver, $accountEntity); $mapper = $this->repository->getMapper(); foreach ($fieldMappingList as $fieldMapping) { $mapper->addFieldMapping($fieldMapping); } } public function getRepository(): Repository { return $this->repository; } public function getMapper(): Mapper { return $this->repository->getMapper(); } /** * @param string $userId * @param string $accountType * @return array */ public function getByUserId(string $userId, string $accountType = ''): array { $query = Query::getInstance() ->table($this->repository->getMapper()->getTable()) ->where('userid = :userid', ['userid' => $userId]) ; if (!empty($accountType)) { $query->where("accounttypeid = :acctype", ["acctype" => $accountType]); } return $this->repository ->getByQuery($query); } /** * @param string $accountTypeId * @return array */ public function getByAccountTypeId(string $accountTypeId): array { $query = Query::getInstance() ->table($this->repository->getMapper()->getTable()) ->where("accounttypeid = :acctype", ["acctype" => $accountTypeId]) ; return $this->repository ->getByQuery($query); } /** * @param int $statementId * @return AccountEntity|null * @throws InvalidArgumentException * @throws \ByJG\MicroOrm\Exception\InvalidArgumentException */ public function getByStatementId(int $statementId): ?AccountEntity { $query = Query::getInstance() ->fields(['account.*']) ->table($this->repository->getMapper()->getTable()) ->join('statement', 'statement.accountid = account.accountid') ->where('statementid = :statementid', ['statementid' => $statementId]) ; $result = $this->repository ->getByQuery($query); if (empty($result)) { return null; } return $result[0]; } }__halt_compiler();----SIGNATURE:----6D9nmo6dqeeCzbfPs32IvkSpF3DmVeVBYnsJuXtTEtqQo4Cg0ABR0sN7sUqsYRTWqt7i8UuOoP91UC0R1PWDDt39aHxCbT+/sBx2NYxxGoXytCUhengEAVFAzJfzhZliEdxclDFw3Gteg6mCA/oPgB8bKJEvoo1vNhCbK2hIHJ4r2prTuQVdAfXghjHFmtbX2yCa7wMCFeBOavO2UnN/C/nBACgpWslAPFgxr9FjLJEkj/jo1EJVRqaWSwMftSM3tJ8DArww8vv7pxGNcBJCd+LJPihcnBaESengw8RVines+Ww6nhj/m9ZfVVp/4MRpAztrEJhnFQUd7tYmHhZsGU+bIqbHUygbuHiZ7f8kbynqLWemPwsFkWMlimYofJezEP0lXHVafPUovfh0+Awxi8U/EgxEcVUgFCyJQEJ2K3462TdFAd9eRv+SP6qKfvFFE6dZ4RK+p8E59E2Z7+Kv6ncz33t3bheHcy0JGIE0ArysIvXGRhuqm+VqI5as68psrDKpXx32Ds0ZZ6ydCrK8eRK3SYp1T8BTt0+LIg5y+8gSIAj+VOz1jrHtEFMNLZ4/FdBdIPmzk0C3xwnR1Le5Xf2Svb+wib6hte6OzrhLVhOpVbbo4fN5WrWSYf6fl2gnxoD94qizC2Tzxl2n320xmkVwu0ndGZxKjF1QT2pNC78=----ATTACHMENT:----NzU4ODkwMTMxNjk2NjMwMSAzMDg0MzE0MjA2NzQ4Nzg4IDI4OTgyMjIxNTIyNzkyMjE=