本文整理汇总了PHP中Package::InstantiateDbRow方法的典型用法代码示例。如果您正苦于以下问题:PHP Package::InstantiateDbRow方法的具体用法?PHP Package::InstantiateDbRow怎么用?PHP Package::InstantiateDbRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Package
的用法示例。
在下文中一共展示了Package::InstantiateDbRow方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: InstantiateCursor
/**
* Instantiate a single Package 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 Package 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 Package::InstantiateDbRow($objDbRow, null, $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
示例2: InstantiateDbRow
/**
* Instantiate a PackageCategory from a Database Row.
* Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
* is calling this PackageCategory::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 PackageCategory
*/
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 . 'id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if ($strExpandAsArrayNodes && $objPreviousItem && $objPreviousItem->intId == $objDbRow->GetColumn($strAliasName, 'Integer')) {
// We are. Now, prepare to check for ExpandAsArray clauses
$blnExpandedViaArray = false;
if (!$strAliasPrefix) {
$strAliasPrefix = 'package_category__';
}
$strAlias = $strAliasPrefix . 'package__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->_objPackageArray)) {
$objPreviousChildItem = $objPreviousItem->_objPackageArray[$intPreviousChildItemCount - 1];
$objChildItem = Package::InstantiateDbRow($objDbRow, $strAliasPrefix . 'package__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
if ($objChildItem) {
$objPreviousItem->_objPackageArray[] = $objChildItem;
}
} else {
$objPreviousItem->_objPackageArray[] = Package::InstantiateDbRow($objDbRow, $strAliasPrefix . 'package__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
$blnExpandedViaArray = true;
}
$strAlias = $strAliasPrefix . 'childpackagecategory__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->_objChildPackageCategoryArray)) {
$objPreviousChildItem = $objPreviousItem->_objChildPackageCategoryArray[$intPreviousChildItemCount - 1];
$objChildItem = PackageCategory::InstantiateDbRow($objDbRow, $strAliasPrefix . 'childpackagecategory__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
if ($objChildItem) {
$objPreviousItem->_objChildPackageCategoryArray[] = $objChildItem;
}
} else {
$objPreviousItem->_objChildPackageCategoryArray[] = PackageCategory::InstantiateDbRow($objDbRow, $strAliasPrefix . 'childpackagecategory__', $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 == 'package_category__') {
$strAliasPrefix = null;
}
}
}
// Create a new instance of the PackageCategory object
$objToReturn = new PackageCategory();
$objToReturn->__blnRestored = true;
$strAliasName = array_key_exists($strAliasPrefix . 'id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'id'] : $strAliasPrefix . 'id';
$objToReturn->intId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'parent_package_category_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'parent_package_category_id'] : $strAliasPrefix . 'parent_package_category_id';
$objToReturn->intParentPackageCategoryId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'token', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'token'] : $strAliasPrefix . 'token';
$objToReturn->strToken = $objDbRow->GetColumn($strAliasName, 'VarChar');
$strAliasName = array_key_exists($strAliasPrefix . 'order_number', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'order_number'] : $strAliasPrefix . 'order_number';
$objToReturn->intOrderNumber = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'name', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'name'] : $strAliasPrefix . 'name';
$objToReturn->strName = $objDbRow->GetColumn($strAliasName, 'VarChar');
$strAliasName = array_key_exists($strAliasPrefix . 'description', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'description'] : $strAliasPrefix . 'description';
$objToReturn->strDescription = $objDbRow->GetColumn($strAliasName, 'Blob');
$strAliasName = array_key_exists($strAliasPrefix . 'package_count', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'package_count'] : $strAliasPrefix . 'package_count';
$objToReturn->intPackageCount = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'last_post_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'last_post_date'] : $strAliasPrefix . 'last_post_date';
$objToReturn->dttLastPostDate = $objDbRow->GetColumn($strAliasName, 'DateTime');
// 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 = 'package_category__';
}
// Check for ParentPackageCategory Early Binding
$strAlias = $strAliasPrefix . 'parent_package_category_id__id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if (!is_null($objDbRow->GetColumn($strAliasName))) {
$objToReturn->objParentPackageCategory = PackageCategory::InstantiateDbRow($objDbRow, $strAliasPrefix . 'parent_package_category_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
//.........这里部分代码省略.........
示例3: InstantiateDbRow
/**
* Instantiate a TopicLink from a Database Row.
* Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
* is calling this TopicLink::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 TopicLink
*/
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 . 'id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if ($strExpandAsArrayNodes && $objPreviousItem && $objPreviousItem->intId == $objDbRow->GetColumn($strAliasName, 'Integer')) {
// We are. Now, prepare to check for ExpandAsArray clauses
$blnExpandedViaArray = false;
if (!$strAliasPrefix) {
$strAliasPrefix = 'topic_link__';
}
$strAlias = $strAliasPrefix . 'message__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->_objMessageArray)) {
$objPreviousChildItem = $objPreviousItem->_objMessageArray[$intPreviousChildItemCount - 1];
$objChildItem = Message::InstantiateDbRow($objDbRow, $strAliasPrefix . 'message__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
if ($objChildItem) {
$objPreviousItem->_objMessageArray[] = $objChildItem;
}
} else {
$objPreviousItem->_objMessageArray[] = Message::InstantiateDbRow($objDbRow, $strAliasPrefix . 'message__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
$blnExpandedViaArray = true;
}
$strAlias = $strAliasPrefix . 'topic__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->_objTopicArray)) {
$objPreviousChildItem = $objPreviousItem->_objTopicArray[$intPreviousChildItemCount - 1];
$objChildItem = Topic::InstantiateDbRow($objDbRow, $strAliasPrefix . 'topic__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
if ($objChildItem) {
$objPreviousItem->_objTopicArray[] = $objChildItem;
}
} else {
$objPreviousItem->_objTopicArray[] = Topic::InstantiateDbRow($objDbRow, $strAliasPrefix . 'topic__', $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 == 'topic_link__') {
$strAliasPrefix = null;
}
}
}
// Create a new instance of the TopicLink object
$objToReturn = new TopicLink();
$objToReturn->__blnRestored = true;
$strAliasName = array_key_exists($strAliasPrefix . 'id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'id'] : $strAliasPrefix . 'id';
$objToReturn->intId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'topic_link_type_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'topic_link_type_id'] : $strAliasPrefix . 'topic_link_type_id';
$objToReturn->intTopicLinkTypeId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'topic_count', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'topic_count'] : $strAliasPrefix . 'topic_count';
$objToReturn->intTopicCount = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'message_count', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'message_count'] : $strAliasPrefix . 'message_count';
$objToReturn->intMessageCount = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'last_post_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'last_post_date'] : $strAliasPrefix . 'last_post_date';
$objToReturn->dttLastPostDate = $objDbRow->GetColumn($strAliasName, 'DateTime');
$strAliasName = array_key_exists($strAliasPrefix . 'forum_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'forum_id'] : $strAliasPrefix . 'forum_id';
$objToReturn->intForumId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'issue_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'issue_id'] : $strAliasPrefix . 'issue_id';
$objToReturn->intIssueId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'wiki_item_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'wiki_item_id'] : $strAliasPrefix . 'wiki_item_id';
$objToReturn->intWikiItemId = $objDbRow->GetColumn($strAliasName, 'Integer');
$strAliasName = array_key_exists($strAliasPrefix . 'package_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'package_id'] : $strAliasPrefix . 'package_id';
$objToReturn->intPackageId = $objDbRow->GetColumn($strAliasName, '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 = 'topic_link__';
}
// Check for Forum Early Binding
$strAlias = $strAliasPrefix . 'forum_id__id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
//.........这里部分代码省略.........
示例4: InstantiateDbRow
/**
* Instantiate a Person from a Database Row.
* Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
* is calling this Person::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 Person
*/
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 . 'id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if ($strExpandAsArrayNodes && $objPreviousItem && $objPreviousItem->intId == $objDbRow->GetColumn($strAliasName, 'Integer')) {
// We are. Now, prepare to check for ExpandAsArray clauses
$blnExpandedViaArray = false;
if (!$strAliasPrefix) {
$strAliasPrefix = 'person__';
}
$strAlias = $strAliasPrefix . 'topicasemail__topic_id__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->_objTopicAsEmailArray)) {
$objPreviousChildItem = $objPreviousItem->_objTopicAsEmailArray[$intPreviousChildItemCount - 1];
$objChildItem = Topic::InstantiateDbRow($objDbRow, $strAliasPrefix . 'topicasemail__topic_id__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
if ($objChildItem) {
$objPreviousItem->_objTopicAsEmailArray[] = $objChildItem;
}
} else {
$objPreviousItem->_objTopicAsEmailArray[] = Topic::InstantiateDbRow($objDbRow, $strAliasPrefix . 'topicasemail__topic_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
$blnExpandedViaArray = true;
}
$strAlias = $strAliasPrefix . 'topicasreadonce__topic_id__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->_objTopicAsReadOnceArray)) {
$objPreviousChildItem = $objPreviousItem->_objTopicAsReadOnceArray[$intPreviousChildItemCount - 1];
$objChildItem = Topic::InstantiateDbRow($objDbRow, $strAliasPrefix . 'topicasreadonce__topic_id__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
if ($objChildItem) {
$objPreviousItem->_objTopicAsReadOnceArray[] = $objChildItem;
}
} else {
$objPreviousItem->_objTopicAsReadOnceArray[] = Topic::InstantiateDbRow($objDbRow, $strAliasPrefix . 'topicasreadonce__topic_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
$blnExpandedViaArray = true;
}
$strAlias = $strAliasPrefix . 'topicasread__topic_id__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->_objTopicAsReadArray)) {
$objPreviousChildItem = $objPreviousItem->_objTopicAsReadArray[$intPreviousChildItemCount - 1];
$objChildItem = Topic::InstantiateDbRow($objDbRow, $strAliasPrefix . 'topicasread__topic_id__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
if ($objChildItem) {
$objPreviousItem->_objTopicAsReadArray[] = $objChildItem;
}
} else {
$objPreviousItem->_objTopicAsReadArray[] = Topic::InstantiateDbRow($objDbRow, $strAliasPrefix . 'topicasread__topic_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
$blnExpandedViaArray = true;
}
$strAlias = $strAliasPrefix . 'issueaspostedby__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->_objIssueAsPostedByArray)) {
$objPreviousChildItem = $objPreviousItem->_objIssueAsPostedByArray[$intPreviousChildItemCount - 1];
$objChildItem = Issue::InstantiateDbRow($objDbRow, $strAliasPrefix . 'issueaspostedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
if ($objChildItem) {
$objPreviousItem->_objIssueAsPostedByArray[] = $objChildItem;
}
} else {
$objPreviousItem->_objIssueAsPostedByArray[] = Issue::InstantiateDbRow($objDbRow, $strAliasPrefix . 'issueaspostedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
$blnExpandedViaArray = true;
}
$strAlias = $strAliasPrefix . 'issueasassignedto__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->_objIssueAsAssignedToArray)) {
$objPreviousChildItem = $objPreviousItem->_objIssueAsAssignedToArray[$intPreviousChildItemCount - 1];
$objChildItem = Issue::InstantiateDbRow($objDbRow, $strAliasPrefix . 'issueasassignedto__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
if ($objChildItem) {
$objPreviousItem->_objIssueAsAssignedToArray[] = $objChildItem;
}
} else {
$objPreviousItem->_objIssueAsAssignedToArray[] = Issue::InstantiateDbRow($objDbRow, $strAliasPrefix . 'issueasassignedto__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
}
$blnExpandedViaArray = true;
}
$strAlias = $strAliasPrefix . 'issuevote__id';
$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
//.........这里部分代码省略.........
示例5: InstantiateDbResult
/**
* Instantiate an array of Packages from a Database Result
* @param DatabaseResultBase $objDbResult
* @param string $strExpandAsArrayNodes
* @param string[] $strColumnAliasArray
* @return Package[]
*/
public static function InstantiateDbResult(QDatabaseResultBase $objDbResult, $strExpandAsArrayNodes = null, $strColumnAliasArray = null)
{
$objToReturn = array();
if (!$strColumnAliasArray) {
$strColumnAliasArray = 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 = Package::InstantiateDbRow($objDbRow, null, $strExpandAsArrayNodes, $objLastRowItem, $strColumnAliasArray);
if ($objItem) {
$objToReturn[] = $objItem;
$objLastRowItem = $objItem;
}
}
} else {
while ($objDbRow = $objDbResult->GetNextRow()) {
$objToReturn[] = Package::InstantiateDbRow($objDbRow, null, null, null, $strColumnAliasArray);
}
}
return $objToReturn;
}