/** * * @return string * @throws \Exception Raises exception if engine is not supported */ private function FindEngineFolder() { $bundle = $this->manifest->BundleName(); $sqlFolder = PathUtil::InstallationSqlFolder($bundle); if (!Folder::Exists($sqlFolder) || Folder::IsEmpty($sqlFolder)) { return ''; } $engine = (string) $this->connection->Engine(); $engineFolder = Path::Combine($sqlFolder, $engine); if (!Folder::Exists($engineFolder)) { throw new \Exception("Bundle {$bundle} doesn't support your database engine '{$engine}'"); } return $engineFolder; }