Version 0.9.5 beta - Core update removed dependencies for the Postgres to MySQL, since it made no sense, also removed the ODBC dependencies for MySQL since it made no sense, will be added to the current Nibiru core version v0.9.5. Also added the correct return types for the PDO adapter so it has code completion.

This commit is contained in:
Stephan Kasdorf
2020-10-29 22:27:40 +01:00
parent dc848b4f8a
commit 334588974a
3 changed files with 12 additions and 8 deletions

View File

@@ -47,7 +47,11 @@ class Mysql implements IMysql
}
}
public static function getInstance( $section = false )
/**
* @param false $section
* @return Mysql
*/
public static function getInstance( $section = false ): Mysql
{
$className = get_called_class();
if(self::$_instance==null) self::$_instance = new $className( $section );
@@ -150,10 +154,10 @@ class Mysql implements IMysql
$this->_dbname = $dbname;
}
/**
* @return string
*/
protected function getConn()
/**
* @return \PDO
*/
public function getConn(): \PDO
{
return $this->_conn;
}

View File

@@ -46,7 +46,7 @@ class Odbc extends Mysql implements IOdbc
}
public static function getInstance( $section = false )
public static function getInstance( $section = false ): Mysql
{
$className = get_called_class();
if(self::$_instance==null) self::$_instance = new $className( $section );

View File

@@ -7,7 +7,7 @@ namespace Nibiru;
* Time: 11:02
*/
class Psql extends Mysql implements IPsql
class Psql implements IPsql
{
use Messages;
@@ -45,7 +45,7 @@ class Psql extends Mysql implements IPsql
}
}
public static function getInstance( $section = false )
public static function getInstance( $section = false ): Psql
{
$className = get_called_class();
if(self::$_instance==null) self::$_instance = new $className( $section );