function __construct($db, $mapping, $rows) { parent::__construct($db, $mapping); $this->rows = $rows; if (count($rows) > 0) { $this->setHeaders(array_keys($rows[0])); } }
function __construct($db, $mapping, $file = "php://stdin") { parent::__construct($db, $mapping); $this->f = fopen($file, "r"); $this->setHeaders(DTCSVStore::parseLineFromFile($this->f)); }