DbPatch_Core_Db::getCliCommand PHP Метод

getCliCommand() защищенный Метод

protected getCliCommand ( string $command, string $filename ) : string
$command string Shell command template to execute, takes :configkey notation
$filename string Filename of patch or dump file
Результат string Command to execute
    protected function getCliCommand($command, $filename)
    {
        $config = $this->getAdapter()->getConfig();
        $params = array();
        $params['filename'] = $filename;
        $keys = array('host', 'port', 'username', 'password', 'dbname', 'charset', 'filename');
        foreach ($keys as $key) {
            if (isset($config[$key]) && !empty($config[$key])) {
                $params[$key] = escapeshellarg($config[$key]);
            }
        }
        return DbPatch_Core_Parser::parse($command, $params);
    }