CORE UPDATE: Minor update concerning the autoloading class in the core, now it is also possible to give a loading order through the configuration
Minor update concerning the form factory classes in the core, now some javascript events are implemented as well, another update concerning functinoallity will follow soon.
Update on the example configuration file, implementing the autoloading order of interfaces, moduels and traits.
Update for multidatabase support, see the documentation on http://www.nibiru-framework.com
This commit is contained in:
@@ -24,10 +24,16 @@ class Mysql implements IMysql
|
||||
|
||||
protected $_conn = self::PLACE_CONNECTION;
|
||||
|
||||
protected function __construct( )
|
||||
protected function __construct( $section = false )
|
||||
{
|
||||
|
||||
$settings = Config::getInstance()->getConfig()[self::SETTINGS_DATABASE];
|
||||
if($section)
|
||||
{
|
||||
$settings = Config::getInstance()->getConfig()[$section];
|
||||
}
|
||||
else
|
||||
{
|
||||
$settings = Config::getInstance()->getConfig()[self::SETTINGS_DATABASE];
|
||||
}
|
||||
$this->_setUsername($settings[self::PLACE_USERNAME]);
|
||||
$this->_setPassword($settings[self::PLACE_PASSWORD]);
|
||||
$this->_setDbname($settings[self::PLACE_DATABASE]);
|
||||
@@ -38,10 +44,10 @@ class Mysql implements IMysql
|
||||
$this->_setConn();
|
||||
}
|
||||
|
||||
public static function getInstance()
|
||||
public static function getInstance( $section = false )
|
||||
{
|
||||
$className = get_called_class();
|
||||
if(self::$_instance==null) self::$_instance = new $className();
|
||||
if(self::$_instance==null) self::$_instance = new $className( $section );
|
||||
return self::$_instance;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user