本文整理匯總了PHP中DibiConnection::getConfig方法的典型用法代碼示例。如果您正苦於以下問題:PHP DibiConnection::getConfig方法的具體用法?PHP DibiConnection::getConfig怎麽用?PHP DibiConnection::getConfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DibiConnection
的用法示例。
在下文中一共展示了DibiConnection::getConfig方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* @param \DibiConnection $dibiConnection
* @param \obo\Interfaces\ICache $cache
*/
public function __construct(\DibiConnection $dibiConnection, \obo\DataStorage\Interfaces\IDataConverter $dataConverter, \obo\Interfaces\ICache $cache = null)
{
if ($dibiConnection->getConfig("driver") !== "mysqli" and $dibiConnection->getConfig("driver") !== "mysql") {
throw new \obo\Exceptions\Exception("Wrong driver has been set for dibi connection. Mysql or mysqli driver was expected.");
}
$this->dibiConnection = $dibiConnection;
$this->dibiTranslator = new \DibiTranslator($this->dibiConnection);
$this->dataConverter = $dataConverter;
$this->cache = $cache;
}
示例2: createBlank
/**
* Returns a blank row (not fetched from database).
* @return array|object
*/
public function createBlank()
{
$row = $this->blankRow;
$row[$this->primary] = NULL;
if ($class = $this->connection->getConfig('result:objects')) {
if ($class === TRUE) {
$row = (object) $row;
} else {
$row = new $class($row);
}
}
return $row;
}