/** * Converts the known connections to XML and converts to a Propel-friendly conf file * * @param boolean $system * @param boolean $nonSystem * @param boolean $quiet */ protected function buildConnections($system, $nonSystem, $quiet) { $opts = array(); if ($system) { $opts[] = '--system'; } if ($nonSystem) { $opts[] = '--non-system'; } if ($quiet) { $opts[] = '--quiet'; } Meshing_Console_Utils::runCommand('Meshing_Console_Command_Connection_Regen', $opts); }
<?php // System initialisation (some hardwiring required before autoloader kicks in) $projectRoot = realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . '..'); require_once $projectRoot . '/lib/Meshing/Paths.php'; require_once $projectRoot . '/lib/Meshing/Utils.php'; Meshing_Utils::initialise(new Meshing_Paths()); // Pop off the script name, grab the command, pop again array_shift($argv); $command = array_key_exists(0, $argv) ? $argv[0] : null; array_shift($argv); if ($command) { $className = Meshing_Console_Utils::getCommandClass($command); if ($className === false) { echo "Unrecognised command.\n"; exit(1); } } else { $className = 'Meshing_Console_Command_Help'; } // Run the implementation try { $ok = Meshing_Console_Utils::runCommand($className, $argv); } catch (Zend_Console_Getopt_Exception $e) { echo $e->getMessage() . "\n"; exit(1); } catch (Meshing_Console_RunException $e) { echo $e->getMessage() . "\n"; exit(2); }