本文整理汇总了PHP中SQLite3::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP SQLite3::__construct方法的具体用法?PHP SQLite3::__construct怎么用?PHP SQLite3::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SQLite3
的用法示例。
在下文中一共展示了SQLite3::__construct方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($filename = false)
{
if (!$filename) {
$filename = dirname(__FILE__) . '/palma.db';
}
trace("db file = {$filename}");
parent::__construct($filename);
// Wait up to 10000 ms when the database is locked.
$this->busyTimeout(10000);
// Create any missing tables.
$this->exec(self::SQL_CREATE_TABLES);
}
示例2: array
function __construct($dbPath)
{
parent::__construct($dbPath, SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE);
// Preparing annotation detection
$this->isDevMode = true;
$this->config = Setup::createAnnotationMetadataConfiguration(array(__DIR__ . "/../../src"), $this->isDevMode);
// Creating entity manager
$this->conn = array('driver' => 'pdo_sqlite', 'path' => $dbPath);
$this->entityManager = EntityManager::create($this->conn, $this->config);
// Checking table
$this->checkTableCreation();
}
示例3: __construct
public function __construct($create = false)
{
$flags = SQLITE3_OPEN_READWRITE;
if ($create) {
$flags |= SQLITE3_OPEN_CREATE;
}
parent::__construct(DB_FILE, $flags);
$this->enableExceptions(true);
// Activer les contraintes des foreign keys
$this->exec('PRAGMA foreign_keys = ON;');
$this->createFunction('transliterate_to_ascii', ['Garradin\\Utils', 'transliterateToAscii']);
$this->createFunction('base64', 'base64_encode');
$this->createFunction('rank', [$this, 'sql_rank']);
}
示例4:
function __construct($string)
{
parent::__construct($string);
}
示例5:
function __construct($dbFilename, $flags = SQLITE3_OPEN_READWRITE)
{
parent::__construct($dbFilename, $flags);
}
示例6: __construct
public function __construct($str_cn = '')
{
list($type, $path) = explode(':', $str_cn);
$this->__par['filename'] = $path;
parent::__construct($path);
}
示例7:
function __construct($dbPath)
{
parent::__construct($dbPath, SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE);
}