} // --path if (preg_match('/--path=(.*)/', $argv[$i], $matches)) { if (is_dir($matches[1]) || is_file($matches[1])) { $options['core']['path'][] = $matches[1]; } else { echo 'Error "' . $matches[1] . '" is not a valid directory' . PHP_EOL; } } // --include if (preg_match('/--include=(.*)/', $argv[$i], $matches)) { $options['core']['include_path'][] = surroundBy($matches[1], '/'); } // --exclude if (preg_match('/--exclude=(.*)/', $argv[$i], $matches)) { $options['core']['exclude_path'][] = surroundBy($matches[1], '/'); } // --driver if (preg_match('/--dbdriver=(.*)/', $argv[$i], $matches)) { $options['core']['dbdriver'] = $matches[1]; } //--ignore-preup if (preg_match('/--ignore-preup/', $argv[$i], $matches)) { $options['core']['ignore_preup'] = true; } //--force if (preg_match('/--force/', $argv[$i], $matches)) { $options['core']['force'] = true; } // --level if (preg_match('/--verbose=(.*)/', $argv[$i], $matches)) {
// Options // --path if (preg_match('/--path=(.*)/', $argv[$i], $matches)) { if (is_dir($matches[1]) || is_file($matches[1])) { $paths[] = $matches[1]; } else { echo 'Error "' . $matches[1] . '" is not a valid directory' . PHP_EOL; } } // --include if (preg_match('/--include=(.*)/', $argv[$i], $matches)) { $includePaths[] = surroundBy($matches[1], '/'); } // --exclude if (preg_match('/--exclude=(.*)/', $argv[$i], $matches)) { $excludePaths[] = surroundBy($matches[1], '/'); } // --driver if (preg_match('/--dbdriver=(.*)/', $argv[$i], $matches)) { // First try the file if (is_file($matches[1])) { require $matches[1]; $className = $matches[1]; $dbDriverName = basename($matches[1], '.php'); } else { $dbDriverName = ucfirst(strtolower($matches[1])); $filePath = 'src/db/driver/' . $dbDriverName . '.php'; if (is_file($filePath)) { require $filePath; $dbDriverName = 'ForgeUpgrade_Db_Driver_' . $dbDriverName; } else {