* @author Dennis Eichhorn * @copyright 2013 Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @link http://orange-management.com */ namespace phpOMS\DataStorage\Database\Connection; use phpOMS\DataStorage\Database\Query\Grammar\Grammar; /** * Database connection interface. * * @category Framework * @package phpOMS\DataStorage\Database * @author OMS Development Team * @author Dennis Eichhorn * @license OMS License 1.0 * @link http://orange-management.com * @since 1.0.0 */ interface ConnectionInterface { /** * Connect to database. * * Overwrites current connection if existing * * @param \string[] $dbdata the basic database information for establishing a connection * * @return void * * @since 1.0.0 * @author Dennis Eichhorn */ public function connect(array $dbdata); /** * Get the database type. * * @return \int * * @since 1.0.0 * @author Dennis Eichhorn */ public function getType() : \int; /** * Get the database status. * * @return \int * * @since 1.0.0 * @author Dennis Eichhorn */ public function getStatus() : \int; /** * Close database connection. * * @return void * * @since 1.0.0 * @author Dennis Eichhorn */ public function close(); /** * Return grammar for this connection. * * @return Grammar * * @since 1.0.0 * @author Dennis Eichhorn */ public function getGrammar() : Grammar; }