本文整理汇总了PHP中Transaction::InstantiateDbRow方法的典型用法代码示例。如果您正苦于以下问题:PHP Transaction::InstantiateDbRow方法的具体用法?PHP Transaction::InstantiateDbRow怎么用?PHP Transaction::InstantiateDbRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transaction
的用法示例。
在下文中一共展示了Transaction::InstantiateDbRow方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: InstantiateDbRow
/**
* Instantiate a Shipment from a Database Row.
* Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
* is calling this Shipment::InstantiateDbRow in order to perform
* early binding on referenced objects.
* @param DatabaseRowBase $objDbRow
* @param string $strAliasPrefix
* @return Shipment
*/
public static function InstantiateDbRow($objDbRow, $strAliasPrefix = null, $strExpandAsArrayNodes = null, $objPreviousItem = null)
{
// If blank row, return null
if (!$objDbRow) {
return null;
}
// See if we're doing an array expansion on the previous item
if ($strExpandAsArrayNodes && $objPreviousItem && $objPreviousItem->intShipmentId == $objDbRow->GetColumn($strAliasPrefix . 'shipment_id', 'Integer')) {
// We are. Now, prepare to check for ExpandAsArray clauses
$blnExpandedViaArray = false;
if (!$strAliasPrefix) {
$strAliasPrefix = 'shipment__';
}
if (array_key_exists($strAliasPrefix . 'fedexshipment__fedex_shipment_id', $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasPrefix . 'fedexshipment__fedex_shipment_id'))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objFedexShipmentArray)) {
$objPreviousChildItem = $objPreviousItem->_objFedexShipmentArray[$intPreviousChildItemCount - 1];
$objChildItem = FedexShipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'fedexshipment__', $strExpandAsArrayNodes, $objPreviousChildItem);
if ($objChildItem) {
array_push($objPreviousItem->_objFedexShipmentArray, $objChildItem);
}
} else {
array_push($objPreviousItem->_objFedexShipmentArray, FedexShipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'fedexshipment__', $strExpandAsArrayNodes));
}
$blnExpandedViaArray = true;
}
// Either return false to signal array expansion, or check-to-reset the Alias prefix and move on
if ($blnExpandedViaArray) {
return false;
} else {
if ($strAliasPrefix == 'shipment__') {
$strAliasPrefix = null;
}
}
}
// Create a new instance of the Shipment object
$objToReturn = new Shipment();
$objToReturn->__blnRestored = true;
$objToReturn->intShipmentId = $objDbRow->GetColumn($strAliasPrefix . 'shipment_id', 'Integer');
$objToReturn->strShipmentNumber = $objDbRow->GetColumn($strAliasPrefix . 'shipment_number', 'VarChar');
$objToReturn->intTransactionId = $objDbRow->GetColumn($strAliasPrefix . 'transaction_id', 'Integer');
$objToReturn->intFromCompanyId = $objDbRow->GetColumn($strAliasPrefix . 'from_company_id', 'Integer');
$objToReturn->intFromContactId = $objDbRow->GetColumn($strAliasPrefix . 'from_contact_id', 'Integer');
$objToReturn->intFromAddressId = $objDbRow->GetColumn($strAliasPrefix . 'from_address_id', 'Integer');
$objToReturn->intToCompanyId = $objDbRow->GetColumn($strAliasPrefix . 'to_company_id', 'Integer');
$objToReturn->intToContactId = $objDbRow->GetColumn($strAliasPrefix . 'to_contact_id', 'Integer');
$objToReturn->intToAddressId = $objDbRow->GetColumn($strAliasPrefix . 'to_address_id', 'Integer');
$objToReturn->intCourierId = $objDbRow->GetColumn($strAliasPrefix . 'courier_id', 'Integer');
$objToReturn->strTrackingNumber = $objDbRow->GetColumn($strAliasPrefix . 'tracking_number', 'VarChar');
$objToReturn->dttShipDate = $objDbRow->GetColumn($strAliasPrefix . 'ship_date', 'Date');
$objToReturn->blnShippedFlag = $objDbRow->GetColumn($strAliasPrefix . 'shipped_flag', 'Bit');
$objToReturn->intCreatedBy = $objDbRow->GetColumn($strAliasPrefix . 'created_by', 'Integer');
$objToReturn->dttCreationDate = $objDbRow->GetColumn($strAliasPrefix . 'creation_date', 'DateTime');
$objToReturn->intModifiedBy = $objDbRow->GetColumn($strAliasPrefix . 'modified_by', 'Integer');
$objToReturn->strModifiedDate = $objDbRow->GetColumn($strAliasPrefix . 'modified_date', 'VarChar');
// Instantiate Virtual Attributes
foreach ($objDbRow->GetColumnNameArray() as $strColumnName => $mixValue) {
$strVirtualPrefix = $strAliasPrefix . '__';
$strVirtualPrefixLength = strlen($strVirtualPrefix);
if (substr($strColumnName, 0, $strVirtualPrefixLength) == $strVirtualPrefix) {
$objToReturn->__strVirtualAttributeArray[substr($strColumnName, $strVirtualPrefixLength)] = $mixValue;
}
}
// Prepare to Check for Early/Virtual Binding
if (!$strAliasPrefix) {
$strAliasPrefix = 'shipment__';
}
// Check for Transaction Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'transaction_id__transaction_id'))) {
$objToReturn->objTransaction = Transaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'transaction_id__', $strExpandAsArrayNodes);
}
// Check for FromCompany Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'from_company_id__company_id'))) {
$objToReturn->objFromCompany = Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'from_company_id__', $strExpandAsArrayNodes);
}
// Check for FromContact Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'from_contact_id__contact_id'))) {
$objToReturn->objFromContact = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'from_contact_id__', $strExpandAsArrayNodes);
}
// Check for FromAddress Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'from_address_id__address_id'))) {
$objToReturn->objFromAddress = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'from_address_id__', $strExpandAsArrayNodes);
}
// Check for ToCompany Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'to_company_id__company_id'))) {
$objToReturn->objToCompany = Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'to_company_id__', $strExpandAsArrayNodes);
}
// Check for ToContact Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'to_contact_id__contact_id'))) {
$objToReturn->objToContact = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'to_contact_id__', $strExpandAsArrayNodes);
}
// Check for ToAddress Early Binding
//.........这里部分代码省略.........
示例2: InstantiateDbRow
/**
* Instantiate a TransactionType from a Database Row.
* Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
* is calling this TransactionType::InstantiateDbRow in order to perform
* early binding on referenced objects.
* @param DatabaseRowBase $objDbRow
* @param string $strAliasPrefix
* @return TransactionType
*/
public static function InstantiateDbRow($objDbRow, $strAliasPrefix = null, $strExpandAsArrayNodes = null, $objPreviousItem = null)
{
// If blank row, return null
if (!$objDbRow) {
return null;
}
// See if we're doing an array expansion on the previous item
if ($strExpandAsArrayNodes && $objPreviousItem && $objPreviousItem->intTransactionTypeId == $objDbRow->GetColumn($strAliasPrefix . 'transaction_type_id', 'Integer')) {
// We are. Now, prepare to check for ExpandAsArray clauses
$blnExpandedViaArray = false;
if (!$strAliasPrefix) {
$strAliasPrefix = 'transaction_type__';
}
if (array_key_exists($strAliasPrefix . 'transaction__transaction_id', $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasPrefix . 'transaction__transaction_id'))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objTransactionArray)) {
$objPreviousChildItem = $objPreviousItem->_objTransactionArray[$intPreviousChildItemCount - 1];
$objChildItem = Transaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'transaction__', $strExpandAsArrayNodes, $objPreviousChildItem);
if ($objChildItem) {
array_push($objPreviousItem->_objTransactionArray, $objChildItem);
}
} else {
array_push($objPreviousItem->_objTransactionArray, Transaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'transaction__', $strExpandAsArrayNodes));
}
$blnExpandedViaArray = true;
}
// Either return false to signal array expansion, or check-to-reset the Alias prefix and move on
if ($blnExpandedViaArray) {
return false;
} else {
if ($strAliasPrefix == 'transaction_type__') {
$strAliasPrefix = null;
}
}
}
// Create a new instance of the TransactionType object
$objToReturn = new TransactionType();
$objToReturn->__blnRestored = true;
$objToReturn->intTransactionTypeId = $objDbRow->GetColumn($strAliasPrefix . 'transaction_type_id', 'Integer');
$objToReturn->strShortDescription = $objDbRow->GetColumn($strAliasPrefix . 'short_description', 'VarChar');
$objToReturn->blnAssetFlag = $objDbRow->GetColumn($strAliasPrefix . 'asset_flag', 'Bit');
$objToReturn->blnInventoryFlag = $objDbRow->GetColumn($strAliasPrefix . 'inventory_flag', 'Bit');
// Instantiate Virtual Attributes
foreach ($objDbRow->GetColumnNameArray() as $strColumnName => $mixValue) {
$strVirtualPrefix = $strAliasPrefix . '__';
$strVirtualPrefixLength = strlen($strVirtualPrefix);
if (substr($strColumnName, 0, $strVirtualPrefixLength) == $strVirtualPrefix) {
$objToReturn->__strVirtualAttributeArray[substr($strColumnName, $strVirtualPrefixLength)] = $mixValue;
}
}
// Prepare to Check for Early/Virtual Binding
if (!$strAliasPrefix) {
$strAliasPrefix = 'transaction_type__';
}
// Check for Transaction Virtual Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'transaction__transaction_id'))) {
if ($strExpandAsArrayNodes && array_key_exists($strAliasPrefix . 'transaction__transaction_id', $strExpandAsArrayNodes)) {
array_push($objToReturn->_objTransactionArray, Transaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'transaction__', $strExpandAsArrayNodes));
} else {
$objToReturn->_objTransaction = Transaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'transaction__', $strExpandAsArrayNodes);
}
}
return $objToReturn;
}
示例3: InstantiateDbRow
/**
* Instantiate a Shipment from a Database Row.
* Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
* is calling this Shipment::InstantiateDbRow in order to perform
* early binding on referenced objects.
* @param QDatabaseRowBase $objDbRow
* @param string $strAliasPrefix
* @param string $strExpandAsArrayNodes
* @param QBaseClass $objPreviousItem
* @param string[] $strColumnAliasArray
* @return Shipment
*/
public static function InstantiateDbRow($objDbRow, $strAliasPrefix = null, $strExpandAsArrayNodes = null, $objPreviousItem = null, $strColumnAliasArray = array())
{
// If blank row, return null
if (!$objDbRow) {
return null;
}
// Create a new instance of the Shipment object
$objToReturn = new Shipment();
$objToReturn->__blnRestored = true;
$strAliasName = array_key_exists($strAliasPrefix . 'shipment_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'shipment_id'] : $strAliasPrefix . 'shipment_id';
$objToReturn->intShipmentId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'shipment_number', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'shipment_number'] : $strAliasPrefix . 'shipment_number';
$objToReturn->strShipmentNumber = $objDbRow->GetColumn($strAliasName, 'VarChar');
$strAliasName = array_key_exists($strAliasPrefix . 'transaction_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'transaction_id'] : $strAliasPrefix . 'transaction_id';
$objToReturn->intTransactionId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'from_company_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'from_company_id'] : $strAliasPrefix . 'from_company_id';
$objToReturn->intFromCompanyId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'from_contact_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'from_contact_id'] : $strAliasPrefix . 'from_contact_id';
$objToReturn->intFromContactId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'from_address_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'from_address_id'] : $strAliasPrefix . 'from_address_id';
$objToReturn->intFromAddressId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'to_company_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'to_company_id'] : $strAliasPrefix . 'to_company_id';
$objToReturn->intToCompanyId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'to_contact_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'to_contact_id'] : $strAliasPrefix . 'to_contact_id';
$objToReturn->intToContactId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'to_address_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'to_address_id'] : $strAliasPrefix . 'to_address_id';
$objToReturn->intToAddressId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'courier_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'courier_id'] : $strAliasPrefix . 'courier_id';
$objToReturn->intCourierId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'tracking_number', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'tracking_number'] : $strAliasPrefix . 'tracking_number';
$objToReturn->strTrackingNumber = $objDbRow->GetColumn($strAliasName, 'VarChar');
$strAliasName = array_key_exists($strAliasPrefix . 'ship_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'ship_date'] : $strAliasPrefix . 'ship_date';
$objToReturn->dttShipDate = $objDbRow->GetColumn($strAliasName, 'Date');
$strAliasName = array_key_exists($strAliasPrefix . 'shipped_flag', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'shipped_flag'] : $strAliasPrefix . 'shipped_flag';
$objToReturn->blnShippedFlag = $objDbRow->GetColumn($strAliasName, 'Bit');
$strAliasName = array_key_exists($strAliasPrefix . 'created_by', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'created_by'] : $strAliasPrefix . 'created_by';
$objToReturn->intCreatedBy = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'creation_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'creation_date'] : $strAliasPrefix . 'creation_date';
$objToReturn->dttCreationDate = $objDbRow->GetColumn($strAliasName, 'DateTime');
$strAliasName = array_key_exists($strAliasPrefix . 'modified_by', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'modified_by'] : $strAliasPrefix . 'modified_by';
$objToReturn->intModifiedBy = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'modified_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'modified_date'] : $strAliasPrefix . 'modified_date';
$objToReturn->strModifiedDate = $objDbRow->GetColumn($strAliasName, 'VarChar');
// Instantiate Virtual Attributes
foreach ($objDbRow->GetColumnNameArray() as $strColumnName => $mixValue) {
$strVirtualPrefix = $strAliasPrefix . '__';
$strVirtualPrefixLength = strlen($strVirtualPrefix);
if (substr($strColumnName, 0, $strVirtualPrefixLength) == $strVirtualPrefix) {
$objToReturn->__strVirtualAttributeArray[substr($strColumnName, $strVirtualPrefixLength)] = $mixValue;
}
}
// Prepare to Check for Early/Virtual Binding
if (!$strAliasPrefix) {
$strAliasPrefix = 'shipment__';
}
// Check for Transaction Early Binding
$strAlias = $strAliasPrefix . 'transaction_id__transaction_id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if (!is_null($objDbRow->GetColumn($strAliasName))) {
$objToReturn->objTransaction = Transaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'transaction_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
// Check for FromCompany Early Binding
$strAlias = $strAliasPrefix . 'from_company_id__company_id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if (!is_null($objDbRow->GetColumn($strAliasName))) {
$objToReturn->objFromCompany = Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'from_company_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
// Check for FromContact Early Binding
$strAlias = $strAliasPrefix . 'from_contact_id__contact_id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if (!is_null($objDbRow->GetColumn($strAliasName))) {
$objToReturn->objFromContact = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'from_contact_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
// Check for FromAddress Early Binding
$strAlias = $strAliasPrefix . 'from_address_id__address_id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if (!is_null($objDbRow->GetColumn($strAliasName))) {
$objToReturn->objFromAddress = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'from_address_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
// Check for ToCompany Early Binding
$strAlias = $strAliasPrefix . 'to_company_id__company_id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if (!is_null($objDbRow->GetColumn($strAliasName))) {
$objToReturn->objToCompany = Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'to_company_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
// Check for ToContact Early Binding
$strAlias = $strAliasPrefix . 'to_contact_id__contact_id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
//.........这里部分代码省略.........
示例4: InstantiateDbRow
/**
* Instantiate a Receipt from a Database Row.
* Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
* is calling this Receipt::InstantiateDbRow in order to perform
* early binding on referenced objects.
* @param DatabaseRowBase $objDbRow
* @param string $strAliasPrefix
* @return Receipt
*/
public static function InstantiateDbRow($objDbRow, $strAliasPrefix = null, $strExpandAsArrayNodes = null, $objPreviousItem = null)
{
// If blank row, return null
if (!$objDbRow) {
return null;
}
// Create a new instance of the Receipt object
$objToReturn = new Receipt();
$objToReturn->__blnRestored = true;
$objToReturn->intReceiptId = $objDbRow->GetColumn($strAliasPrefix . 'receipt_id', 'Integer');
$objToReturn->intTransactionId = $objDbRow->GetColumn($strAliasPrefix . 'transaction_id', 'Integer');
$objToReturn->intFromCompanyId = $objDbRow->GetColumn($strAliasPrefix . 'from_company_id', 'Integer');
$objToReturn->intFromContactId = $objDbRow->GetColumn($strAliasPrefix . 'from_contact_id', 'Integer');
$objToReturn->intToContactId = $objDbRow->GetColumn($strAliasPrefix . 'to_contact_id', 'Integer');
$objToReturn->intToAddressId = $objDbRow->GetColumn($strAliasPrefix . 'to_address_id', 'Integer');
$objToReturn->strReceiptNumber = $objDbRow->GetColumn($strAliasPrefix . 'receipt_number', 'VarChar');
$objToReturn->dttDueDate = $objDbRow->GetColumn($strAliasPrefix . 'due_date', 'Date');
$objToReturn->dttReceiptDate = $objDbRow->GetColumn($strAliasPrefix . 'receipt_date', 'Date');
$objToReturn->blnReceivedFlag = $objDbRow->GetColumn($strAliasPrefix . 'received_flag', 'Bit');
$objToReturn->intCreatedBy = $objDbRow->GetColumn($strAliasPrefix . 'created_by', 'Integer');
$objToReturn->dttCreationDate = $objDbRow->GetColumn($strAliasPrefix . 'creation_date', 'DateTime');
$objToReturn->intModifiedBy = $objDbRow->GetColumn($strAliasPrefix . 'modified_by', 'Integer');
$objToReturn->strModifiedDate = $objDbRow->GetColumn($strAliasPrefix . 'modified_date', 'VarChar');
// Instantiate Virtual Attributes
foreach ($objDbRow->GetColumnNameArray() as $strColumnName => $mixValue) {
$strVirtualPrefix = $strAliasPrefix . '__';
$strVirtualPrefixLength = strlen($strVirtualPrefix);
if (substr($strColumnName, 0, $strVirtualPrefixLength) == $strVirtualPrefix) {
$objToReturn->__strVirtualAttributeArray[substr($strColumnName, $strVirtualPrefixLength)] = $mixValue;
}
}
// Prepare to Check for Early/Virtual Binding
if (!$strAliasPrefix) {
$strAliasPrefix = 'receipt__';
}
// Check for Transaction Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'transaction_id__transaction_id'))) {
$objToReturn->objTransaction = Transaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'transaction_id__', $strExpandAsArrayNodes);
}
// Check for FromCompany Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'from_company_id__company_id'))) {
$objToReturn->objFromCompany = Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'from_company_id__', $strExpandAsArrayNodes);
}
// Check for FromContact Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'from_contact_id__contact_id'))) {
$objToReturn->objFromContact = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'from_contact_id__', $strExpandAsArrayNodes);
}
// Check for ToContact Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'to_contact_id__contact_id'))) {
$objToReturn->objToContact = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'to_contact_id__', $strExpandAsArrayNodes);
}
// Check for ToAddress Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'to_address_id__address_id'))) {
$objToReturn->objToAddress = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'to_address_id__', $strExpandAsArrayNodes);
}
// Check for CreatedByObject Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'created_by__user_account_id'))) {
$objToReturn->objCreatedByObject = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'created_by__', $strExpandAsArrayNodes);
}
// Check for ModifiedByObject Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'modified_by__user_account_id'))) {
$objToReturn->objModifiedByObject = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'modified_by__', $strExpandAsArrayNodes);
}
return $objToReturn;
}
示例5: InstantiateDbRow
/**
* Instantiate a AssetTransaction from a Database Row.
* Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
* is calling this AssetTransaction::InstantiateDbRow in order to perform
* early binding on referenced objects.
* @param QDatabaseRowBase $objDbRow
* @param string $strAliasPrefix
* @param string $strExpandAsArrayNodes
* @param QBaseClass $objPreviousItem
* @param string[] $strColumnAliasArray
* @return AssetTransaction
*/
public static function InstantiateDbRow($objDbRow, $strAliasPrefix = null, $strExpandAsArrayNodes = null, $objPreviousItem = null, $strColumnAliasArray = array())
{
// If blank row, return null
if (!$objDbRow) {
return null;
}
// See if we're doing an array expansion on the previous item
$strAlias = $strAliasPrefix . 'asset_transaction_id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if ($strExpandAsArrayNodes && $objPreviousItem && $objPreviousItem->intAssetTransactionId == $objDbRow->GetColumn($strAliasName, 'Integer')) {
// We are. Now, prepare to check for ExpandAsArray clauses
$blnExpandedViaArray = false;
if (!$strAliasPrefix) {
$strAliasPrefix = 'asset_transaction__';
}
$strAlias = $strAliasPrefix . 'childassettransaction__asset_transaction_id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objChildAssetTransactionArray)) {
$objPreviousChildItem = $objPreviousItem->_objChildAssetTransactionArray[$intPreviousChildItemCount - 1];
$objChildItem = AssetTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'childassettransaction__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
if ($objChildItem) {
$objPreviousItem->_objChildAssetTransactionArray[] = $objChildItem;
}
} else {
$objPreviousItem->_objChildAssetTransactionArray[] = AssetTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'childassettransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
$blnExpandedViaArray = true;
}
// Either return false to signal array expansion, or check-to-reset the Alias prefix and move on
if ($blnExpandedViaArray) {
return false;
} else {
if ($strAliasPrefix == 'asset_transaction__') {
$strAliasPrefix = null;
}
}
}
// Create a new instance of the AssetTransaction object
$objToReturn = new AssetTransaction();
$objToReturn->__blnRestored = true;
$strAliasName = array_key_exists($strAliasPrefix . 'asset_transaction_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'asset_transaction_id'] : $strAliasPrefix . 'asset_transaction_id';
$objToReturn->intAssetTransactionId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'asset_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'asset_id'] : $strAliasPrefix . 'asset_id';
$objToReturn->intAssetId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'transaction_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'transaction_id'] : $strAliasPrefix . 'transaction_id';
$objToReturn->intTransactionId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'parent_asset_transaction_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'parent_asset_transaction_id'] : $strAliasPrefix . 'parent_asset_transaction_id';
$objToReturn->intParentAssetTransactionId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'source_location_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'source_location_id'] : $strAliasPrefix . 'source_location_id';
$objToReturn->intSourceLocationId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'destination_location_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'destination_location_id'] : $strAliasPrefix . 'destination_location_id';
$objToReturn->intDestinationLocationId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'new_asset_flag', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'new_asset_flag'] : $strAliasPrefix . 'new_asset_flag';
$objToReturn->blnNewAssetFlag = $objDbRow->GetColumn($strAliasName, 'Bit');
$strAliasName = array_key_exists($strAliasPrefix . 'new_asset_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'new_asset_id'] : $strAliasPrefix . 'new_asset_id';
$objToReturn->intNewAssetId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'schedule_receipt_flag', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'schedule_receipt_flag'] : $strAliasPrefix . 'schedule_receipt_flag';
$objToReturn->blnScheduleReceiptFlag = $objDbRow->GetColumn($strAliasName, 'Bit');
$strAliasName = array_key_exists($strAliasPrefix . 'schedule_receipt_due_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'schedule_receipt_due_date'] : $strAliasPrefix . 'schedule_receipt_due_date';
$objToReturn->dttScheduleReceiptDueDate = $objDbRow->GetColumn($strAliasName, 'Date');
$strAliasName = array_key_exists($strAliasPrefix . 'created_by', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'created_by'] : $strAliasPrefix . 'created_by';
$objToReturn->intCreatedBy = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'creation_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'creation_date'] : $strAliasPrefix . 'creation_date';
$objToReturn->dttCreationDate = $objDbRow->GetColumn($strAliasName, 'DateTime');
$strAliasName = array_key_exists($strAliasPrefix . 'modified_by', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'modified_by'] : $strAliasPrefix . 'modified_by';
$objToReturn->intModifiedBy = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'modified_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'modified_date'] : $strAliasPrefix . 'modified_date';
$objToReturn->strModifiedDate = $objDbRow->GetColumn($strAliasName, 'VarChar');
// Instantiate Virtual Attributes
foreach ($objDbRow->GetColumnNameArray() as $strColumnName => $mixValue) {
$strVirtualPrefix = $strAliasPrefix . '__';
$strVirtualPrefixLength = strlen($strVirtualPrefix);
if (substr($strColumnName, 0, $strVirtualPrefixLength) == $strVirtualPrefix) {
$objToReturn->__strVirtualAttributeArray[substr($strColumnName, $strVirtualPrefixLength)] = $mixValue;
}
}
// Prepare to Check for Early/Virtual Binding
if (!$strAliasPrefix) {
$strAliasPrefix = 'asset_transaction__';
}
// Check for Asset Early Binding
$strAlias = $strAliasPrefix . 'asset_id__asset_id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if (!is_null($objDbRow->GetColumn($strAliasName))) {
$objToReturn->objAsset = Asset::InstantiateDbRow($objDbRow, $strAliasPrefix . 'asset_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
// Check for Transaction Early Binding
//.........这里部分代码省略.........
示例6: InstantiateCursor
/**
* Instantiate a single Transaction object from a query cursor (e.g. a DB ResultSet).
* Cursor is automatically moved to the "next row" of the result set.
* Will return NULL if no cursor or if the cursor has no more rows in the resultset.
* @param QDatabaseResultBase $objDbResult cursor resource
* @return Transaction next row resulting from the query
*/
public static function InstantiateCursor(QDatabaseResultBase $objDbResult)
{
// If blank resultset, then return empty result
if (!$objDbResult) {
return null;
}
// If empty resultset, then return empty result
$objDbRow = $objDbResult->GetNextRow();
if (!$objDbRow) {
return null;
}
// We need the Column Aliases
$strColumnAliasArray = $objDbResult->QueryBuilder->ColumnAliasArray;
if (!$strColumnAliasArray) {
$strColumnAliasArray = array();
}
// Pull Expansions (if applicable)
$strExpandAsArrayNodes = $objDbResult->QueryBuilder->ExpandAsArrayNodes;
// Load up the return result with a row and return it
return Transaction::InstantiateDbRow($objDbRow, null, $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
示例7: InstantiateDbRow
/**
* Instantiate a InventoryTransaction from a Database Row.
* Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
* is calling this InventoryTransaction::InstantiateDbRow in order to perform
* early binding on referenced objects.
* @param DatabaseRowBase $objDbRow
* @param string $strAliasPrefix
* @return InventoryTransaction
*/
public static function InstantiateDbRow($objDbRow, $strAliasPrefix = null, $strExpandAsArrayNodes = null, $objPreviousItem = null)
{
// If blank row, return null
if (!$objDbRow) {
return null;
}
// Create a new instance of the InventoryTransaction object
$objToReturn = new InventoryTransaction();
$objToReturn->__blnRestored = true;
$objToReturn->intInventoryTransactionId = $objDbRow->GetColumn($strAliasPrefix . 'inventory_transaction_id', 'Integer');
$objToReturn->intInventoryLocationId = $objDbRow->GetColumn($strAliasPrefix . 'inventory_location_id', 'Integer');
$objToReturn->intTransactionId = $objDbRow->GetColumn($strAliasPrefix . 'transaction_id', 'Integer');
$objToReturn->intQuantity = $objDbRow->GetColumn($strAliasPrefix . 'quantity', 'Integer');
$objToReturn->intSourceLocationId = $objDbRow->GetColumn($strAliasPrefix . 'source_location_id', 'Integer');
$objToReturn->intDestinationLocationId = $objDbRow->GetColumn($strAliasPrefix . 'destination_location_id', 'Integer');
$objToReturn->intCreatedBy = $objDbRow->GetColumn($strAliasPrefix . 'created_by', 'Integer');
$objToReturn->dttCreationDate = $objDbRow->GetColumn($strAliasPrefix . 'creation_date', 'DateTime');
$objToReturn->intModifiedBy = $objDbRow->GetColumn($strAliasPrefix . 'modified_by', 'Integer');
$objToReturn->strModifiedDate = $objDbRow->GetColumn($strAliasPrefix . 'modified_date', 'VarChar');
$objToReturn->intLocalWarehouseStock = $objDbRow->GetColumn($strAliasPrefix . 'local_warehouse_stock', 'Integer');
$objToReturn->intBadProductsWarehouseStock = $objDbRow->GetColumn($strAliasPrefix . 'bad_products_warehouse_stock', 'Integer');
$objToReturn->intSampleWarehouseStock = $objDbRow->GetColumn($strAliasPrefix . 'sample_warehouse_stock', 'Integer');
$objToReturn->intRepairWarehouseStock = $objDbRow->GetColumn($strAliasPrefix . 'repair_warehouse_stock', 'Integer');
// Instantiate Virtual Attributes
foreach ($objDbRow->GetColumnNameArray() as $strColumnName => $mixValue) {
$strVirtualPrefix = $strAliasPrefix . '__';
$strVirtualPrefixLength = strlen($strVirtualPrefix);
if (substr($strColumnName, 0, $strVirtualPrefixLength) == $strVirtualPrefix) {
$objToReturn->__strVirtualAttributeArray[substr($strColumnName, $strVirtualPrefixLength)] = $mixValue;
}
}
// Prepare to Check for Early/Virtual Binding
if (!$strAliasPrefix) {
$strAliasPrefix = 'inventory_transaction__';
}
// Check for InventoryLocation Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'inventory_location_id__inventory_location_id'))) {
$objToReturn->objInventoryLocation = InventoryLocation::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventory_location_id__', $strExpandAsArrayNodes);
}
// Check for Transaction Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'transaction_id__transaction_id'))) {
$objToReturn->objTransaction = Transaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'transaction_id__', $strExpandAsArrayNodes);
}
// Check for SourceLocation Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'source_location_id__location_id'))) {
$objToReturn->objSourceLocation = Location::InstantiateDbRow($objDbRow, $strAliasPrefix . 'source_location_id__', $strExpandAsArrayNodes);
}
// Check for DestinationLocation Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'destination_location_id__location_id'))) {
$objToReturn->objDestinationLocation = Location::InstantiateDbRow($objDbRow, $strAliasPrefix . 'destination_location_id__', $strExpandAsArrayNodes);
}
// Check for CreatedByObject Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'created_by__user_account_id'))) {
$objToReturn->objCreatedByObject = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'created_by__', $strExpandAsArrayNodes);
}
// Check for ModifiedByObject Early Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'modified_by__user_account_id'))) {
$objToReturn->objModifiedByObject = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'modified_by__', $strExpandAsArrayNodes);
}
return $objToReturn;
}
示例8: InstantiateDbResult
/**
* Instantiate an array of Transactions from a Database Result
* @param DatabaseResultBase $objDbResult
* @return Transaction[]
*/
public static function InstantiateDbResult(QDatabaseResultBase $objDbResult, $strExpandAsArrayNodes = null)
{
$objToReturn = array();
// If blank resultset, then return empty array
if (!$objDbResult) {
return $objToReturn;
}
// Load up the return array with each row
if ($strExpandAsArrayNodes) {
$objLastRowItem = null;
while ($objDbRow = $objDbResult->GetNextRow()) {
$objItem = Transaction::InstantiateDbRow($objDbRow, null, $strExpandAsArrayNodes, $objLastRowItem);
if ($objItem) {
array_push($objToReturn, $objItem);
$objLastRowItem = $objItem;
}
}
} else {
while ($objDbRow = $objDbResult->GetNextRow()) {
array_push($objToReturn, Transaction::InstantiateDbRow($objDbRow));
}
}
return $objToReturn;
}
示例9: InstantiateDbRow
/**
* Instantiate a UserAccount from a Database Row.
* Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
* is calling this UserAccount::InstantiateDbRow in order to perform
* early binding on referenced objects.
* @param QDatabaseRowBase $objDbRow
* @param string $strAliasPrefix
* @param string $strExpandAsArrayNodes
* @param QBaseClass $objPreviousItem
* @param string[] $strColumnAliasArray
* @return UserAccount
*/
public static function InstantiateDbRow($objDbRow, $strAliasPrefix = null, $strExpandAsArrayNodes = null, $objPreviousItem = null, $strColumnAliasArray = array())
{
// If blank row, return null
if (!$objDbRow) {
return null;
}
// See if we're doing an array expansion on the previous item
$strAlias = $strAliasPrefix . 'user_account_id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if ($strExpandAsArrayNodes && $objPreviousItem && $objPreviousItem->intUserAccountId == $objDbRow->GetColumn($strAliasName, 'Integer')) {
// We are. Now, prepare to check for ExpandAsArray clauses
$blnExpandedViaArray = false;
if (!$strAliasPrefix) {
$strAliasPrefix = 'user_account__';
}
$strAlias = $strAliasPrefix . 'addressascreatedby__address_id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objAddressAsCreatedByArray)) {
$objPreviousChildItem = $objPreviousItem->_objAddressAsCreatedByArray[$intPreviousChildItemCount - 1];
$objChildItem = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'addressascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
if ($objChildItem) {
$objPreviousItem->_objAddressAsCreatedByArray[] = $objChildItem;
}
} else {
$objPreviousItem->_objAddressAsCreatedByArray[] = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'addressascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
$blnExpandedViaArray = true;
}
$strAlias = $strAliasPrefix . 'addressasmodifiedby__address_id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objAddressAsModifiedByArray)) {
$objPreviousChildItem = $objPreviousItem->_objAddressAsModifiedByArray[$intPreviousChildItemCount - 1];
$objChildItem = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'addressasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
if ($objChildItem) {
$objPreviousItem->_objAddressAsModifiedByArray[] = $objChildItem;
}
} else {
$objPreviousItem->_objAddressAsModifiedByArray[] = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'addressasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
$blnExpandedViaArray = true;
}
$strAlias = $strAliasPrefix . 'assetasmodifiedby__asset_id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objAssetAsModifiedByArray)) {
$objPreviousChildItem = $objPreviousItem->_objAssetAsModifiedByArray[$intPreviousChildItemCount - 1];
$objChildItem = Asset::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
if ($objChildItem) {
$objPreviousItem->_objAssetAsModifiedByArray[] = $objChildItem;
}
} else {
$objPreviousItem->_objAssetAsModifiedByArray[] = Asset::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
$blnExpandedViaArray = true;
}
$strAlias = $strAliasPrefix . 'assetascreatedby__asset_id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objAssetAsCreatedByArray)) {
$objPreviousChildItem = $objPreviousItem->_objAssetAsCreatedByArray[$intPreviousChildItemCount - 1];
$objChildItem = Asset::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
if ($objChildItem) {
$objPreviousItem->_objAssetAsCreatedByArray[] = $objChildItem;
}
} else {
$objPreviousItem->_objAssetAsCreatedByArray[] = Asset::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
$blnExpandedViaArray = true;
}
$strAlias = $strAliasPrefix . 'assetmodelasmodifiedby__asset_model_id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objAssetModelAsModifiedByArray)) {
$objPreviousChildItem = $objPreviousItem->_objAssetModelAsModifiedByArray[$intPreviousChildItemCount - 1];
$objChildItem = AssetModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetmodelasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
if ($objChildItem) {
$objPreviousItem->_objAssetModelAsModifiedByArray[] = $objChildItem;
}
} else {
$objPreviousItem->_objAssetModelAsModifiedByArray[] = AssetModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetmodelasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
$blnExpandedViaArray = true;
}
$strAlias = $strAliasPrefix . 'assetmodelascreatedby__asset_model_id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
//.........这里部分代码省略.........