src/Acquia/Cloud/Database/DatabaseCredentials.php
public function dsn()
    {
        // @see https://github.com/acquia/acquia-sdk-php/issues/27
        if (!isset($this['name'])) {
            throw new \OutOfBoundsException('Malformed response: expecting "name" property');
        }
        if (!isset($this['host'])) {
            throw new \OutOfBoundsException('Malformed response: expecting "host" property');
        }
        if (!isset($this['port'])) {
            throw new \OutOfBoundsException('Malformed response: expecting "port" property');
        }

        return 'mysql:dbname=' . $this['name'] . ';host=' . $this['host'] . ';port=' . $this['port'];
    }
public function dsn()
    {
        // @see https://github.com/acquia/acquia-sdk-php/issues/27
        if (!isset($this['name'])) {
            throw new \OutOfBoundsException('Malformed response: expecting "name" property');
        }
        if (!isset($this['host'])) {
            throw new \OutOfBoundsException('Malformed response: expecting "host" property');
        }
        if (!isset($this['port'])) {
            throw new \OutOfBoundsException('Malformed response: expecting "port" property');
        }

        return 'mysql:dbname=' . $this['name'] . ';host=' . $this['host'] . ';port=' . $this['port'];
    }
public function dsn ( ) { // @see https://github.com/acquia/acquia-sdk-php/issues/27 if ( ! isset ( $ this [ 'name' ] ) ) { throw new \ OutOfBoundsException ( 'Malformed response: expecting "name" property' ) ; } if ( ! isset ( $ this [ 'host' ] ) ) { throw new \ OutOfBoundsException ( 'Malformed response: expecting "host" property' ) ; } if ( ! isset ( $ this [ 'port' ] ) ) { throw new \ OutOfBoundsException ( 'Malformed response: expecting "port" property' ) ; } return 'mysql:dbname=' . $ this [ 'name' ] . ';host=' . $ this [ 'host' ] . ';port=' . $ this [ 'port' ] ; }
Returns the DSN for the active host.

@return string

@throws \OutOfBoundsException
Returns the DSN for the active host .