Add getters for connection

This commit is contained in:
Dennis Eichhorn 2017-09-29 17:13:38 +02:00
parent 69123a0b24
commit 663dd31ad0

View File

@ -110,6 +110,42 @@ abstract class ConnectionAbstract implements ConnectionInterface
return $this->status;
}
/**
* Get database name.
*
* @return string
*
* @since 1.0.0
*/
public function getDatabase() : string
{
return $this->dbdata['database'];
}
/**
* Get database host.
*
* @return string
*
* @since 1.0.0
*/
public function getHost() : string
{
return $this->dbdata['host'];
}
/**
* Get database port.
*
* @return int
*
* @since 1.0.0
*/
public function getPort() : int
{
return (int) $this->dbdata['port'];
}
/**
* Get table prefix.
*