/** * @return string * @throws InvalidInputException */ public function run() { if (!$this->exportEngine) { throw new \RuntimeException('An Export Engine (Mixpo\\Igniter\\Tools\\Export\\ExportEngine) has not been set via ->setExportEngine()'); } if (!$this->pdoConnection) { $this->pdoConnection = new \PDO($this->dsnString); } $this->exportEngine->verifyDestinationIsWritable(); $this->validateSelectCriteria($this->selectCriteria); list($query, $bindings) = $this->constructSelectQuery(); $results = $this->executeQuery($query, $bindings); return $this->exportResult($results); }