public function __construct(Nextgen_Core_Database $db, $tableName) { $this->elements = array_values($db->getTable($tableName)->getFields()); $this->position = 0; }