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:----V3JwMouBQFcCJ1GYLutWJp0Z6sMQMMfhOh02RzCcHSRCMZRga8hBA9cwratIcMHAm0wn6knmByrEKFuBO3Koj7yaBWzg6qorhriFG3e9kvFH5TlB4ZKu1cOdKPbUb5wQtGntgzNFbe8uiZDwCM0k/GTp8/k0gpVHSBcs3HtZSwNRGA0Rc0WkLgJZhzEzRq/Fl0y2HmZaF4DnS5Wl4VJcXBBAwUBZWeYsaEqJMcEY1ZQP0/CjdN7Xk4n91Gj2eUXlcXwkq5fbH7V0zfsaIqngcP7NAOuvofz05pplZwe+fpWTI74HiHYOuvvfD6jKsQn53ooTn/ah0KqTDkixIWOw4LwvJCEeGRV4OeUV3fUUi06xJndwT5IUWortsgNgOMJhHOZxiPNXRVQU4COZ5JbQmBE1aVZwc9XruQdIFSn3LcPJnnnpNhsq89L4H0y9vTtS8dhPJuPOOskpETL1Zc35kifjXEx2p3Te58ThVL4lQgXrVEroh2Nn9IVHfRXIGJPB/XY8D30w0K+E88FAWBoiO37C2mf2Li/EMnFJutWZfrhGw4Fr4grk2/M/PfzVfMLzb+b6df05pzb5S6CrAucCyL/xthcFF0UBn8HGpQdmAKRSpvs0gDV7+hncESpXnAWz7i5wHQh5EBXRS441X8cHRSkLc28EPU01bdBHxknPqBg=----ATTACHMENT:----NDUxMjYyNjI5OTcwMjgxMyAxNDc4MzY4NzgxMzczMzQyIDY2OTc3MjM4MDA5MzAzNDc=