Skip to content

Commit

Permalink
Merge pull request #5 from alllinux/v0.9.4.2
Browse files Browse the repository at this point in the history
V0.9.4.2
  • Loading branch information
alllinux authored Nov 19, 2019
2 parents b3d34d4 + a2c7170 commit b479865
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 35 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
core/l/*
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Nibiru
### Rapid Prototyping PHP Framework
Version 0.9.3 beta
Version 0.9.4.2 beta
## Introduction

<div style="word-spacing: 2px; letter-spacing: 0.1px; font-size: 12px; margin-bottom: 15px;">Nibiru is a rapid prototyping framework written in PHP and based on the MVC design pattern. Now one may say that writing <br>
Expand All @@ -20,6 +20,9 @@ Engine Implementation.</div>
<li>Dwoo template engine ( untested )</li>
<li>Twig template engine ( untested )</li>
<li>PDO adapter to the MySQL database</li>
<li>PDO adapter to the Postgress database</li>
<li>ODBC adapter to the Postgress database</li>
<li>Autogenerator for models corresponding to the database tables</li>
<ol>
<li>read datasets from a complete table</li>
<li>read datasets by selection from a table</li>
Expand Down Expand Up @@ -117,15 +120,20 @@ Engine Implementation.</div>
<li>Add autoated class generator for MySQL database models</li>
</ul>

<h1>Update</h1>
<p>Version 0.9.3 beta 09.11.2019</p>
<ul>
<li>Autoloader is now supporting a better module structure</li>
<li>Some minor bugfixes</li>
<li>Updated the annotations for better autocompletion</li>
<li>removed the Twig and Dwoo engines, they are not needed anymore</li>
</ul>

<h1>Update</h1>
<p>Version 0.9.4.2</p>
<ul>
<li>Database is.active switch in the configuration file</li>
<li>minor bugfix in the Postgress Database Adapter</li>
<li>added .gitignore file</li>
</ul>
<h1>TODO</h1>
<p>Still in progress for the next version</p>
<ul>
Expand Down
13 changes: 10 additions & 3 deletions core/c/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,16 @@ class Model extends Table

public function __construct($argv)
{
parent::__construct($argv);
$this->createOutFolder();
$this->createClassFiles();
if(Config::getInstance()->getConfig()[IMysql::SETTINGS_DATABASE][IMysql::PLACE_IS_ACTIVE])
{
parent::__construct($argv);
$this->createOutFolder();
$this->createClassFiles();
}
else
{
return false;
}
}

private function createOutFolder()
Expand Down
19 changes: 11 additions & 8 deletions core/c/mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,17 @@ protected function __construct( $section = false )
{
$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]);
$this->_setDiver($settings[self::PLACE_DRIVER]);
$this->_setHostname($settings[self::PLACE_HOSTNAME]);
$this->_setPort($settings[self::PLACE_PORT]);
$this->_setDsn();
$this->_setConn();
if($settings[self::PLACE_IS_ACTIVE])
{
$this->_setUsername($settings[self::PLACE_USERNAME]);
$this->_setPassword($settings[self::PLACE_PASSWORD]);
$this->_setDbname($settings[self::PLACE_DATABASE]);
$this->_setDiver($settings[self::PLACE_DRIVER]);
$this->_setHostname($settings[self::PLACE_HOSTNAME]);
$this->_setPort($settings[self::PLACE_PORT]);
$this->_setDsn();
$this->_setConn();
}
}

public static function getInstance( $section = false )
Expand Down
26 changes: 17 additions & 9 deletions core/c/odbc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,23 @@ protected function __construct( $section = false )
{
$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]);
$this->_setDiver($settings[self::PLACE_DRIVER]);
$this->_setHostname($settings[self::PLACE_HOSTNAME]);
$this->_setPort($settings[self::PLACE_PORT]);
$this->_setReadOnly($settings[self::PLACE_READONLY]);
$this->_setDsn();
$this->_setConn();
if($settings[self::PLACE_IS_ACTIVE])
{
$this->_setUsername($settings[self::PLACE_USERNAME]);
$this->_setPassword($settings[self::PLACE_PASSWORD]);
$this->_setDbname($settings[self::PLACE_DATABASE]);
$this->_setDiver($settings[self::PLACE_DRIVER]);
$this->_setHostname($settings[self::PLACE_HOSTNAME]);
$this->_setPort($settings[self::PLACE_PORT]);
$this->_setReadOnly($settings[self::PLACE_READONLY]);
$this->_setDsn();
$this->_setConn();
}
else
{
return false;
}

}

public static function getInstance( $section = false )
Expand Down
31 changes: 19 additions & 12 deletions core/c/psql.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,26 @@ protected function __construct( $section = false )
}
else
{
$section = Config::getInstance()->getConfig()[self::SETTINGS_DATABASE];
$settings = Config::getInstance()->getConfig()[self::SETTINGS_DATABASE];
}
if($settings[self::PLACE_IS_ACTIVE])
{
$this->_setUsername($settings[self::PLACE_USERNAME]);
$this->_setPassword($settings[self::PLACE_PASSWORD]);
$this->_setDbname($settings[self::PLACE_DATABASE]);
$this->_setDiver($settings[self::PLACE_DRIVER]);
$this->_setHostname($settings[self::PLACE_HOSTNAME]);
$this->_setPort($settings[self::PLACE_PORT]);
$this->_setReadOnly($settings[self::PLACE_READONLY]);
$this->_setEncoding($settings[self::PLACE_ENCODING]);
$this->_setMultithreading($settings[self::PLACE_MULTI_THREADING]);
$this->_setDsn();
$this->_setConn();
}
else
{
return false;
}
$this->_setUsername($settings[self::PLACE_USERNAME]);
$this->_setPassword($settings[self::PLACE_PASSWORD]);
$this->_setDbname($settings[self::PLACE_DATABASE]);
$this->_setDiver($settings[self::PLACE_DRIVER]);
$this->_setHostname($settings[self::PLACE_HOSTNAME]);
$this->_setPort($settings[self::PLACE_PORT]);
$this->_setReadOnly($settings[self::PLACE_READONLY]);
$this->_setEncoding($settings[self::PLACE_ENCODING]);
$this->_setMultithreading($settings[self::PLACE_MULTI_THREADING]);
$this->_setDsn();
$this->_setConn();
}

public static function getInstance( $section = false )
Expand Down
1 change: 1 addition & 0 deletions core/i/mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface IMysql
const PLACE_QUERY_LIMIT = "NO LIMIT";
const PLACE_SORT_ORDER = "NO ORDER";
const PLACE_DSN = "NO CONNECTION STRING";
const PLACE_IS_ACTIVE = "is.active";
const PLACE_USERNAME = "username";
const PLACE_PASSWORD = "password";
const PLACE_HOSTNAME = "hostname";
Expand Down

0 comments on commit b479865

Please sign in to comment.