Поправил название классов
This commit is contained in:
parent
f041488554
commit
0b66a72484
3 changed files with 20 additions and 14 deletions
|
|
@ -1,7 +1,15 @@
|
|||
<?php
|
||||
///<reference path="Database/PDOStatement.php" />
|
||||
|
||||
namespace ctiso;
|
||||
namespace {
|
||||
if(!function_exists('sqliteLower')){
|
||||
function sqliteLower($str) {
|
||||
return mb_strtolower($str, 'UTF-8');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace ctiso {
|
||||
use PDO,
|
||||
ctiso\Database\Statement,
|
||||
ctiso\Database\IdGenerator;
|
||||
|
|
@ -45,13 +53,7 @@ class Database extends PDO
|
|||
$connection->setAttribute(PDO::ATTR_TIMEOUT, 5);
|
||||
$mode = defined('SQLITE_JOURNAL_MODE') ? SQLITE_JOURNAL_MODE : 'WAL';
|
||||
$connection->query("PRAGMA journal_mode=$mode");
|
||||
|
||||
if(!function_exists('sqliteLower')){
|
||||
function sqliteLower($str) {
|
||||
return mb_strtolower($str, 'UTF-8');
|
||||
}
|
||||
$connection->sqliteCreateFunction('LOWER', 'sqliteLower', 1);
|
||||
}
|
||||
$connection->sqliteCreateFunction('LOWER', 'sqliteLower', 1);
|
||||
}
|
||||
$connection->dsn = $dsn;
|
||||
return $connection;
|
||||
|
|
@ -183,3 +185,4 @@ class Database extends PDO
|
|||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue