init($transactionlog->getClassName()); $this->logreader = $transactionlog->getTransactionLogReader(); } /** * Selects and SQL, creates objects and assign them * * @param string $sql * @param array $parameters * @throws DatabaseConnectionException * @throws DatabaseErrorException */ public function selectString($sql, array $parameters = []) { $this->clear(); $oDb = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC); if ($this->_aSqlLimit[0] || $this->_aSqlLimit[1]) { /** @var ResultSet $rs */ $rs = $oDb->selectLimit($sql, $this->_aSqlLimit[1], $this->_aSqlLimit[0], $parameters); } else { /** @var ResultSet $rs */ $rs = $oDb->select($sql, $parameters); } if ($rs && $rs->count() > 0) { while (!$rs->EOF) { /** @var BaseModel $oListObject */ $oListObject = oxNew($this->_sObjectsInListName, $this->logreader); $this->assignElement($oListObject, $rs->fields); $this->add($oListObject); $rs->fetchRow(); } } } }