findEntity($sql, [$id]); } /** * @param int $limit * @param int $offset * @return Text[] */ public function findAll($limit=null, $offset=null) { $sql = 'SELECT * FROM `*PREFIX*polls_txts`'; return $this->findEntities($sql, [], $limit, $offset); } /** * @param string $pollId * @param int $limit * @param int $offset * @return Text[] */ public function findByPoll($pollId, $limit=null, $offset=null) { $sql = 'SELECT * FROM `*PREFIX*polls_txts` WHERE poll_id=?'; return $this->findEntities($sql, [$pollId], $limit, $offset); } /** * @param string $pollId */ public function deleteByPoll($pollId) { $sql = 'DELETE FROM `*PREFIX*polls_txts` WHERE poll_id=?'; $this->execute($sql, [$pollId]); } }