本文整理汇总了PHP中Connection::getSupplementalDriver方法的典型用法代码示例。如果您正苦于以下问题:PHP Connection::getSupplementalDriver方法的具体用法?PHP Connection::getSupplementalDriver怎么用?PHP Connection::getSupplementalDriver使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Connection
的用法示例。
在下文中一共展示了Connection::getSupplementalDriver方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tryDelimite
protected function tryDelimite($s)
{
$driver = $this->connection->getSupplementalDriver();
return preg_replace_callback('#(?<=[^\\w`"\\[]|^)[a-z_][a-z0-9_]*(?=[^\\w`"(\\]]|$)#i', create_function('$m', 'extract(NCFix::$vars[' . NCFix::uses(array('driver' => $driver)) . '], EXTR_REFS);
return strtoupper($m[0]) === $m[0] ? $m[0] : $driver->delimite($m[0]);
'), $s);
}
示例2: reloadForeignKeys
protected function reloadForeignKeys($table)
{
foreach ($this->connection->getSupplementalDriver()->getForeignKeys($table) as $row) {
$this->structure['belongsTo'][strtolower($table)][$row['local']] = $row['table'];
$this->structure['hasMany'][strtolower($row['table'])][$row['local'] . $table] = array($row['local'], $table);
}
if (isset($this->structure['belongsTo'][$table])) {
uksort($this->structure['belongsTo'][$table], create_function('$a, $b', '
return strlen($a) - strlen($b);
'));
}
}
示例3: getPrimarySequence
/**
* @return string
*/
public function getPrimarySequence()
{
if ($this->primarySequence === FALSE) {
$this->primarySequence = NULL;
$driver = $this->connection->getSupplementalDriver();
if ($driver->isSupported(ISupplementalDriver::SUPPORT_SEQUENCE)) {
foreach ($driver->getColumns($this->name) as $column) {
if ($column['name'] === $this->primary) {
$this->primarySequence = $column['vendor']['sequence'];
break;
}
}
}
}
return $this->primarySequence;
}
示例4: detectColumnTypes
private function detectColumnTypes()
{
if ($this->types === NULL) {
$this->types = array();
if ($this->connection->getSupplementalDriver()->isSupported(ISupplementalDriver::SUPPORT_COLUMNS_META)) {
// workaround for PHP bugs #53782, #54695
$col = 0;
while ($meta = $this->getColumnMeta($col++)) {
if (isset($meta['native_type'])) {
$this->types[$meta['name']] = DatabaseHelpers::detectType($meta['native_type']);
}
}
}
}
return $this->types;
}
示例5: __construct
public function __construct(Connection $connection)
{
$this->connection = $connection;
$this->driver = $connection->getSupplementalDriver();
}