protected function getServiceInstanceDatabase(ServiceDbInterface $instance)
    {
        $port = current($instance->getHostPorts());

        return (new Database($this->databaseInfoMapping()))
            ->setPort($port)
            ->setUser($instance->username())
            ->setPassword($instance->password())
            ->setProtocol($instance->protocol())
            ->setHostname($instance->getName())
            ->setDatabase($instance->database());
    }
protected function getServiceInstanceDatabase(ServiceDbInterface $instance)
    {
        $port = current($instance->getHostPorts());

        return (new Database($this->databaseInfoMapping()))
            ->setPort($port)
            ->setUser($instance->username())
            ->setPassword($instance->password())
            ->setProtocol($instance->protocol())
            ->setHostname($instance->getName())
            ->setDatabase($instance->database());
    }
protected function getServiceInstanceDatabase ( ServiceDbInterface $ instance ) { $ port = current ( $ instance -> getHostPorts ( ) ) ; return ( new Database ( $ this -> databaseInfoMapping ( ) ) ) -> setPort ( $ port ) -> setUser ( $ instance -> username ( ) ) -> setPassword ( $ instance -> password ( ) ) -> setProtocol ( $ instance -> protocol ( ) ) -> setHostname ( $ instance -> getName ( ) ) -> setDatabase ( $ instance -> database ( ) ) ; }
Get a service instance database object.

@param ServiceDbInterface $instance
The service database instance.

@return Database
The database object.
Get a service instance database object .