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:----IvUCKqG5KgfXK89iCsWL+dXw8dhBzlQ95plt/Aom/Wa7o1bSX3LUW42GMDuxRG3MVQ7kR3V0VEZ4nlqs1UHEfnBe9bUjqlOIP1VKjqM5yYC82YSSS8p/P8GR8dSQhG7rFwc0R1SoUBqJNJ6yIIKRrJiAKNFfFotKiyIDy4C3vuH3DYqJRP+pkUQJvAXbKY43xY94vGRRj5s3n8TgYcgJbxsGnP+M6sAo9PIgNp/1IKnPD573dyse5rESTPjHxYmY5YKvrvKIbcbSn4CsxhuXykBBysvpXNEXvAZRvhNgWwOnVOFSN04T+NbIyQOpsMr977R4GPeK2T4m+0ElBiIsefYH3W2Wd4eSounSX4Q1jgmktbG3niz1E8nURE/gDk764V1X/Nw8WdY0f+dXCIOpMsVL2Psi0FM/gUoT3ZSdczFLjmbrlj5A06dhFVpEa5hFfkLGltEfDADo4Hp7sevceyK6KjsdhLpkO4TOvtfB61bCX8P8gxlVFLKPkPPEqXzN1ekEm00Ao+o33J5YXp0ZD1Fny7XDDFPXtHW1n9T4W84PxW9Ryh2oXzGgVzDKFjb79YZCyJQNA4TltwcNXly+PGzMWIc4/jickm/jp4rntFjz++OrPrb4d6ZZAWBOR+6efId0zGGFb+rTwNqJFwocpRHYFKoO3GqQPKytFjsWopI=----ATTACHMENT:----NjMyNTkyMDkzMzc5MjEwOSA4MzQ2ODQ0ODU0NDkzMjA3IDEwNzI4ODY3OTEyNjk5NDc=