protected static function _prepare_and_extract($args) { $out = array(); self::$_env = $args[0]; $errors = self::_validate_config(); if ($errors !== true) { foreach ($errors as $error) { WP_Cli::error($error); } return false; } $out = self::config_constants_to_array(); $out['env'] = self::$_env; $out['db_user'] = escapeshellarg($out['db_user']); $out['db_host'] = escapeshellarg($out['db_host']); $out['db_password'] = escapeshellarg($out['db_password']); $out['ssh_port'] = isset($out['ssh_port']) ? intval($out['ssh_port']) : 22; $out['excludes'] = explode(':', $out['excludes']); return $out; }