本文整理汇总了PHP中BizSystem::configuration方法的典型用法代码示例。如果您正苦于以下问题:PHP BizSystem::configuration方法的具体用法?PHP BizSystem::configuration怎么用?PHP BizSystem::configuration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BizSystem
的用法示例。
在下文中一共展示了BizSystem::configuration方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Initialize object
* @param string $module module name
* @param string $dbname database name alias in configuration file
* @param string $table database table name
* @param array $opts more option
* @return void
*/
function __construct($module, $dbname, $table, $opts)
{
$this->module = $module;
$this->dbname = $dbname;
$this->table = $table;
$this->opts = $opts;
$this->dbConfig = BizSystem::configuration()->getDatabaseInfo($dbname);
}
示例2: dbs
protected function dbs()
{
$dbinfo = BizSystem::configuration()->getDatabaseInfo();
$i = 0;
foreach ($dbinfo as $db) {
$list[$i]['val'] = $db['Name'];
$list[$i]['txt'] = $db['Name'];
$i++;
}
return $list;
}
示例3: buildInsertSQL
/**
* Build insert-sql
* INSERT INTO table_name (column1, column2,...) VALUES (value1, value2,....)
*
* @param BizDataObj $dataObj
* @param array $joinValues array of join values
* @return string Insert-SQL statement
*/
public function buildInsertSQL($dataObj, $joinValues = null)
{
// generate column value pairs.
$sqlFlds = $dataObj->m_BizRecord->getToSaveFields('CREATE');
$dbInfo = BizSystem::configuration()->getDatabaseInfo($dataObj->m_Database);
$dbType = $dbInfo["Driver"];
$sql_col = "";
$sql_val = "";
$db = $dataObj->getDBConnection('WRITE');
foreach ($sqlFlds as $fldobj) {
$col = $fldobj->m_Column;
// if Field Id has null value and Id is an identity type, remove the Id's column from the array
if ($fldobj->m_Name == "Id" && $dataObj->m_IdGeneration == "Identity") {
continue;
}
if ($fldobj->isLobField()) {
// special value for blob/clob type
$_val = $fldobj->getInsertLobValue($dbType);
} else {
$_val = $fldobj->getSqlValue();
if ($_val == '' && $fldobj->m_ValueOnCreate != "") {
$_val = $fldobj->getValueOnCreate();
}
}
//if (!$_val || $_val == '') continue;
// modified by jixian for not ignore 0 value
if ($_val === '') {
continue;
}
$sql_col .= "`" . $col . "`, ";
$sql_val .= $db->quote($_val) . ", ";
//$sql_val .= QueryStringParam::formatQueryValue($_val). ", ";
}
// if joinValues is given then add join values in to the main table InsertSQL.
if (is_array($joinValues)) {
foreach ($joinValues as $joinColumn => $joinValue) {
if (!$joinValue || $joinValue == '') {
continue;
}
$sql_col .= "`" . $joinColumn . "`, ";
$sql_val .= "'" . $joinValue . "', ";
}
}
$sql_col = substr($sql_col, 0, -2);
$sql_val = substr($sql_val, 0, -2);
$sql = "INSERT INTO `" . $dataObj->m_MainTable . "` (" . $sql_col . ") VALUES (" . $sql_val . ")";
return $sql;
}
示例4: setQuoteIdentifiers
/**
* set char to quote system identifiers
* @return void
*/
protected function setQuoteIdentifiers($dataObj)
{
if ($this->m_QuoteIdentifiers == null) {
$this->m_QuoteIdentifiers = '';
$dbInfo = BizSystem::configuration()->getDatabaseInfo($dataObj->m_Database);
if (strtoupper($dbInfo["Driver"]) == "PDO_MYSQL") {
$this->m_QuoteIdentifiers = '`';
}
}
}