Version 0.9.5 beta - update for database functionality, updated the db.class.mask, and the mysql autogeneration for files.
This commit is contained in:
16
README.md
16
README.md
@@ -1,6 +1,6 @@
|
||||
# Nibiru
|
||||
### Rapid Prototyping PHP Framework
|
||||
Version 0.9.4.2 beta
|
||||
Version 0.9.5 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>
|
||||
@@ -127,7 +127,6 @@ Engine Implementation.</div>
|
||||
<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.3</p>
|
||||
<ul>
|
||||
<li>Database is.active switch in the configuration file</li>
|
||||
@@ -143,6 +142,19 @@ Engine Implementation.</div>
|
||||
<li>soap interface to a given SOAP server (canceled, not needed to old)</li>
|
||||
<li>bitcoin api, and payment gateway</li>
|
||||
</ul>
|
||||
<h1>Update</h1>
|
||||
<p>Version 0.9.5</p>
|
||||
<ul>
|
||||
<li>Added Autogenerator for database tables</li>
|
||||
<li>Fixed some minor bug in the db.class.mask</li>
|
||||
</ul>
|
||||
<h1>TODO</h1>
|
||||
<p>Still in progress for the next version</p>
|
||||
<ul>
|
||||
<li>framework documentation</li>
|
||||
<li>class documentation</li>
|
||||
<li>bitcoin api, and payment gateway</li>
|
||||
</ul>
|
||||
|
||||
<div style="word-spacing: 2px; letter-spacing: 0.1px; font-size: 15px; margin-bottom: 15px;">The start is done, have success with PHP prototyping, and always remember to have fun!</div>
|
||||
Author: Stephan Kasdorf<br><br>
|
||||
@@ -20,7 +20,7 @@ class [CLASSNAME] extends Db
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
[ADAPTER]::settingsSection('[DBSECTION]');
|
||||
[CONNECTOR]::settingsSection('[DBSECTION]');
|
||||
self::initTable( self::TABLE );
|
||||
}
|
||||
|
||||
@@ -29,8 +29,4 @@ class [CLASSNAME] extends Db
|
||||
return self::TABLE;
|
||||
}
|
||||
|
||||
public function insertArrayIntoTable($dataset = array())
|
||||
{
|
||||
// TODO: Implement insertArrayIntoTable() method.
|
||||
}
|
||||
}
|
||||
@@ -106,15 +106,18 @@ class Model extends Table
|
||||
if(Config::getInstance()->getConfig()[self::CONFIG_SECTION]['odbc'])
|
||||
{
|
||||
$template = str_replace('[ADAPTER]', self::ADAPTER_POSTGRES, $template);
|
||||
$template = str_replace('[CONNECTOR]', self::ADAPTER_POSTGRES, $template);
|
||||
}
|
||||
else
|
||||
{
|
||||
$template = str_replace('[ADAPTER]', self::ADAPTER_POSTGRESQL, $template);
|
||||
$template = str_replace('[CONNECTOR]', self::ADAPTER_POSTGRESQL, $template);
|
||||
}
|
||||
}
|
||||
if($this->getDatabaseDriver()==self::DB_DRIVER_MYSQL)
|
||||
{
|
||||
$template = str_replace('[ADAPTER]', self::ADAPTER_MYSQL, $template);
|
||||
$template = str_replace('[CONNECTOR]', self::ADAPTER_PDO, $template);
|
||||
}
|
||||
|
||||
if(Config::getInstance()->getConfig()[self::CONFIG_SECTION][self::DB_OVERWRITE_MODELS])
|
||||
|
||||
@@ -23,6 +23,7 @@ class Table
|
||||
const ADAPTER_POSTGRES = "Postgres";
|
||||
const ADAPTER_POSTGRESQL = "Postgresql";
|
||||
const ADAPTER_MYSQL = "MySQL";
|
||||
const ADAPTER_PDO = "Pdo";
|
||||
|
||||
const PARAMETERS = array(
|
||||
'--table',
|
||||
@@ -228,7 +229,13 @@ class Table
|
||||
}
|
||||
if($this->getDatabaseDriver()==self::DB_DRIVER_MYSQL)
|
||||
{
|
||||
//TODO: Implement the Table array for MySQL
|
||||
Pdo::settingsSection( $this->getConfigSection() );
|
||||
$result = Pdo::queryString('SHOW TABLES;');
|
||||
foreach ($result as $entry)
|
||||
{
|
||||
$this->_setFields(array_shift($entry));
|
||||
$this->_tables[array_shift($entry)] = $this->getFields();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,7 +351,12 @@ class Table
|
||||
}
|
||||
if($this->getDatabaseDriver()==self::DB_DRIVER_MYSQL)
|
||||
{
|
||||
//TODO: Implement the Table array for MySQL
|
||||
Pdo::settingsSection( $this->getConfigSection() );
|
||||
$result = Pdo::queryString('DESCRIBE ' . $table . ';' );
|
||||
foreach($result as $field)
|
||||
{
|
||||
$this->_fields[] = $field['Field'];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user