Updated Index library.
This commit is contained in:
parent
4af67cc422
commit
fd085514e5
23 changed files with 183 additions and 320 deletions
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
namespace Makai;
|
||||
|
||||
use Index\Data\DbTools;
|
||||
use Syokuhou\SharpConfig;
|
||||
use Index\Config\Fs\FsConfig;
|
||||
use Index\Db\DbBackends;
|
||||
|
||||
define('MKI_STARTUP', microtime(true));
|
||||
define('MKI_ROOT', __DIR__);
|
||||
|
@ -19,7 +19,7 @@ error_reporting(MKI_DEBUG ? -1 : 0);
|
|||
mb_internal_encoding('UTF-8');
|
||||
date_default_timezone_set('GMT');
|
||||
|
||||
$cfg = SharpConfig::fromFile(MKI_ROOT . '/makai.cfg');
|
||||
$cfg = FsConfig::fromFile(MKI_ROOT . '/makai.cfg');
|
||||
|
||||
if($cfg->hasValues('sentry:dsn'))
|
||||
(function($cfg) {
|
||||
|
@ -34,7 +34,7 @@ if($cfg->hasValues('sentry:dsn'))
|
|||
});
|
||||
})($cfg->scopeTo('sentry'));
|
||||
|
||||
$db = DbTools::create($cfg->getString('database:dsn', 'null:'));
|
||||
$db = DbBackends::create($cfg->getString('database:dsn', 'null:'));
|
||||
$db->execute('SET SESSION time_zone = \'+00:00\', sql_mode = \'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION\'');
|
||||
|
||||
$makai = new MakaiContext($db);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue