public function getDefaultConnection()
    {
        if (null === $this->defaultConnectionName) {
            throw new \RuntimeException('There is not default connection name.');
        }

        if (!isset($this->connections[$this->defaultConnectionName])) {
            throw new \RuntimeException(sprintf('The default connection "%s" does not exists.', $this->defaultConnectionName));
        }

        return $this->connections[$this->defaultConnectionName];
    }
public function getDefaultConnection()
    {
        if (null === $this->defaultConnectionName) {
            throw new \RuntimeException('There is not default connection name.');
        }

        if (!isset($this->connections[$this->defaultConnectionName])) {
            throw new \RuntimeException(sprintf('The default connection "%s" does not exists.', $this->defaultConnectionName));
        }

        return $this->connections[$this->defaultConnectionName];
    }
public function getDefaultConnection ( ) { if ( null === $ this -> defaultConnectionName ) { throw new \ RuntimeException ( 'There is not default connection name.' ) ; } if ( ! isset ( $ this -> connections [ $ this -> defaultConnectionName ] ) ) { throw new \ RuntimeException ( sprintf ( 'The default connection "%s" does not exists.' , $ this -> defaultConnectionName ) ) ; } return $ this -> connections [ $ this -> defaultConnectionName ] ; }
Returns the default connection.

@return \Mandango\ConnectionInterface The default connection.

@throws \RuntimeException If there is not default connection name.
@throws \RuntimeException If the default connection does not exists.

@api
Returns the default connection .