src/Rocketeer/Services/Connections/Credentials/CredentialsGatherer.php
public function getConnectionsCredentials()
    {
        $connectionName = null;
        if ($this->connections) {
            $this->presentConnections($this->connections);
            if ($this->command->confirm('Do you want to add a connection to this?', false)) {
                $connectionName = $this->command->ask('What do you want to name it?');
            }
        } else {
            $connectionName = $this->command->ask('No connections have been set, let\'s create one, what do you want to name it?', 'production');
        }

        // If the user does not want to add any more connection
        // then we can quit
        if (!$connectionName) {
            return $this->connections;
        }

        $this->getConnectionCredentials($connectionName);

        return $this->getConnectionsCredentials();
    }
public function getConnectionsCredentials()
    {
        $connectionName = null;
        if ($this->connections) {
            $this->presentConnections($this->connections);
            if ($this->command->confirm('Do you want to add a connection to this?', false)) {
                $connectionName = $this->command->ask('What do you want to name it?');
            }
        } else {
            $connectionName = $this->command->ask('No connections have been set, let\'s create one, what do you want to name it?', 'production');
        }

        // If the user does not want to add any more connection
        // then we can quit
        if (!$connectionName) {
            return $this->connections;
        }

        $this->getConnectionCredentials($connectionName);

        return $this->getConnectionsCredentials();
    }
public function getConnectionsCredentials ( ) { $ connectionName = null ; if ( $ this -> connections ) { $ this -> presentConnections ( $ this -> connections ) ; if ( $ this -> command -> confirm ( 'Do you want to add a connection to this?' , false ) ) { $ connectionName = $ this -> command -> ask ( 'What do you want to name it?' ) ; } } else { $ connectionName = $ this -> command -> ask ( 'No connections have been set, let\'s create one, what do you want to name it?' , 'production' ) ; } // If the user does not want to add any more connection // then we can quit if ( ! $ connectionName ) { return $ this -> connections ; } $ this -> getConnectionCredentials ( $ connectionName ) ; return $ this -> getConnectionsCredentials ( ) ; }
Get the credentials of all connections.

@return array
Get the credentials of all connections .