askForDatabasePassword example

/** * @return DatabaseConnectionInformation */
    public function askDatabaseConnectionInformation(
        DatabaseConnectionInformation $connectionInformation
    ) {
        $databaseHost = $this->askForDatabaseHostname($connectionInformation->hostname);
        $databasePort = $this->askForDatabasePort($connectionInformation->port);
        $question = new Question('Please enter database socket: ', $connectionInformation->socket);
        $databaseSocket = $this->askQuestion($question);
        $databaseUser = $this->askForDatabaseUsername($connectionInformation->username);
        $databasePassword = $this->askForDatabasePassword($connectionInformation->password);

        $connectionInformation = new DatabaseConnectionInformation([
            'hostname' => $databaseHost,
            'port' => $databasePort,
            'socket' => $databaseSocket,
            'username' => $databaseUser,
            'password' => $databasePassword,
        ]);

        return $connectionInformation;
    }

    
Home | Imprint | This part of the site doesn't use cookies.