本文整理匯總了PHP中oxBase::init方法的典型用法代碼示例。如果您正苦於以下問題:PHP oxBase::init方法的具體用法?PHP oxBase::init怎麽用?PHP oxBase::init使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類oxBase
的用法示例。
在下文中一共展示了oxBase::init方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getBaseObject
/**
* Initializes or returns existing list template object.
*
* @return oxBase
*/
public function getBaseObject()
{
if (!$this->_oBaseObject) {
$this->_oBaseObject = oxNew($this->_sObjectsInListName);
$this->_oBaseObject->setInList();
$this->_oBaseObject->init($this->_sCoreTable);
}
return $this->_oBaseObject;
}
示例2: init
/**
* Sets the names to main and view tables, loads metadata of each table.
*
* @param string $sTableName Name of DB object table
* @param bool $blForceAllFields Forces initialisation of all fields overriding lazy loading functionality
*
* @return null
*/
public function init($sTableName = null, $blForceAllFields = false)
{
//$this->_sCacheKey = null;
return parent::init($sTableName, $blForceAllFields);
}
示例3: createObj2Obj
/**
* Create object 2 object connection in databse
*
* @param array $aData db fields and values
* @param string $sObj2ObjTable table name
*/
public function createObj2Obj($aData, $sObj2ObjTable)
{
if (empty($aData)) {
return;
}
$iCnt = count($aData);
for ($i = 0; $i < $iCnt; $i++) {
$oObj = new oxBase();
$oObj->init($sObj2ObjTable);
if ($iCnt < 2) {
$aObj = $aData[$i];
} else {
$aObj = $aData;
}
foreach ($aObj as $sKey => $sValue) {
$sField = $sObj2ObjTable . "__" . $sKey;
$oObj->{$sField} = new oxField($sValue, oxField::T_RAW);
}
$oObj->save();
}
}