/**
  * Instantiate a single WpPvcTotal 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 WpPvcTotal 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 WpPvcTotal::InstantiateDbRow($objDbRow, null, $strExpandAsArrayNodes, null, $strColumnAliasArray);
 }
示例#2
0
 /**
  * Instantiate a WpPosts from a Database Row.
  * Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
  * is calling this WpPosts::InstantiateDbRow in order to perform
  * early binding on referenced objects.
  * @param DatabaseRowBase $objDbRow
  * @param string $strAliasPrefix
  * @param string $strExpandAsArrayNodes
  * @param QBaseClass $arrPreviousItem
  * @param string[] $strColumnAliasArray
  * @return WpPosts
  */
 public static function InstantiateDbRow($objDbRow, $strAliasPrefix = null, $strExpandAsArrayNodes = null, $arrPreviousItems = 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 && is_array($arrPreviousItems) && count($arrPreviousItems)) {
         foreach ($arrPreviousItems as $objPreviousItem) {
             if ($objPreviousItem->intId == $objDbRow->GetColumn($strAliasName, 'Integer')) {
                 // We are.  Now, prepare to check for ExpandAsArray clauses
                 $blnExpandedViaArray = false;
                 if (!$strAliasPrefix) {
                     $strAliasPrefix = 'wp_posts__';
                 }
                 // Expanding reverse references: WpCommentsAsCommentPost
                 $strAlias = $strAliasPrefix . 'wpcommentsascommentpost__comment_ID';
                 $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
                 if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
                     if (null === $objPreviousItem->_objWpCommentsAsCommentPostArray) {
                         $objPreviousItem->_objWpCommentsAsCommentPostArray = array();
                     }
                     if ($intPreviousChildItemCount = count($objPreviousItem->_objWpCommentsAsCommentPostArray)) {
                         $objPreviousChildItems = $objPreviousItem->_objWpCommentsAsCommentPostArray;
                         $objChildItem = WpComments::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wpcommentsascommentpost__', $strExpandAsArrayNodes, $objPreviousChildItems, $strColumnAliasArray);
                         if ($objChildItem) {
                             $objPreviousItem->_objWpCommentsAsCommentPostArray[] = $objChildItem;
                         }
                     } else {
                         $objPreviousItem->_objWpCommentsAsCommentPostArray[] = WpComments::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wpcommentsascommentpost__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
                     }
                     $blnExpandedViaArray = true;
                 }
                 // Expanding reverse references: WpPostmetaAsPost
                 $strAlias = $strAliasPrefix . 'wppostmetaaspost__meta_id';
                 $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
                 if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
                     if (null === $objPreviousItem->_objWpPostmetaAsPostArray) {
                         $objPreviousItem->_objWpPostmetaAsPostArray = array();
                     }
                     if ($intPreviousChildItemCount = count($objPreviousItem->_objWpPostmetaAsPostArray)) {
                         $objPreviousChildItems = $objPreviousItem->_objWpPostmetaAsPostArray;
                         $objChildItem = WpPostmeta::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wppostmetaaspost__', $strExpandAsArrayNodes, $objPreviousChildItems, $strColumnAliasArray);
                         if ($objChildItem) {
                             $objPreviousItem->_objWpPostmetaAsPostArray[] = $objChildItem;
                         }
                     } else {
                         $objPreviousItem->_objWpPostmetaAsPostArray[] = WpPostmeta::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wppostmetaaspost__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
                     }
                     $blnExpandedViaArray = true;
                 }
                 // Expanding reverse references: WpPostsAsPostParent
                 $strAlias = $strAliasPrefix . 'wppostsaspostparent__ID';
                 $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
                 if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
                     if (null === $objPreviousItem->_objWpPostsAsPostParentArray) {
                         $objPreviousItem->_objWpPostsAsPostParentArray = array();
                     }
                     if ($intPreviousChildItemCount = count($objPreviousItem->_objWpPostsAsPostParentArray)) {
                         $objPreviousChildItems = $objPreviousItem->_objWpPostsAsPostParentArray;
                         $objChildItem = WpPosts::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wppostsaspostparent__', $strExpandAsArrayNodes, $objPreviousChildItems, $strColumnAliasArray);
                         if ($objChildItem) {
                             $objPreviousItem->_objWpPostsAsPostParentArray[] = $objChildItem;
                         }
                     } else {
                         $objPreviousItem->_objWpPostsAsPostParentArray[] = WpPosts::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wppostsaspostparent__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
                     }
                     $blnExpandedViaArray = true;
                 }
                 // Expanding reverse references: WpPvcDailyAsPostnum
                 $strAlias = $strAliasPrefix . 'wppvcdailyaspostnum__id';
                 $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
                 if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
                     if (null === $objPreviousItem->_objWpPvcDailyAsPostnumArray) {
                         $objPreviousItem->_objWpPvcDailyAsPostnumArray = array();
                     }
                     if ($intPreviousChildItemCount = count($objPreviousItem->_objWpPvcDailyAsPostnumArray)) {
                         $objPreviousChildItems = $objPreviousItem->_objWpPvcDailyAsPostnumArray;
                         $objChildItem = WpPvcDaily::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wppvcdailyaspostnum__', $strExpandAsArrayNodes, $objPreviousChildItems, $strColumnAliasArray);
                         if ($objChildItem) {
                             $objPreviousItem->_objWpPvcDailyAsPostnumArray[] = $objChildItem;
                         }
                     } else {
                         $objPreviousItem->_objWpPvcDailyAsPostnumArray[] = WpPvcDaily::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wppvcdailyaspostnum__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
                     }
                     $blnExpandedViaArray = true;
                 }
                 // Expanding reverse references: WpPvcTotalAsPostnum
                 $strAlias = $strAliasPrefix . 'wppvctotalaspostnum__id';
                 $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
                 if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
                     if (null === $objPreviousItem->_objWpPvcTotalAsPostnumArray) {
                         $objPreviousItem->_objWpPvcTotalAsPostnumArray = array();
                     }
                     if ($intPreviousChildItemCount = count($objPreviousItem->_objWpPvcTotalAsPostnumArray)) {
                         $objPreviousChildItems = $objPreviousItem->_objWpPvcTotalAsPostnumArray;
                         $objChildItem = WpPvcTotal::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wppvctotalaspostnum__', $strExpandAsArrayNodes, $objPreviousChildItems, $strColumnAliasArray);
                         if ($objChildItem) {
                             $objPreviousItem->_objWpPvcTotalAsPostnumArray[] = $objChildItem;
                         }
                     } else {
                         $objPreviousItem->_objWpPvcTotalAsPostnumArray[] = WpPvcTotal::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wppvctotalaspostnum__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
                     }
                     $blnExpandedViaArray = true;
                 }
                 // Expanding reverse references: WpWtiLikePostAsPost
                 $strAlias = $strAliasPrefix . 'wpwtilikepostaspost__id';
                 $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
                 if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
                     if (null === $objPreviousItem->_objWpWtiLikePostAsPostArray) {
                         $objPreviousItem->_objWpWtiLikePostAsPostArray = array();
                     }
                     if ($intPreviousChildItemCount = count($objPreviousItem->_objWpWtiLikePostAsPostArray)) {
                         $objPreviousChildItems = $objPreviousItem->_objWpWtiLikePostAsPostArray;
                         $objChildItem = WpWtiLikePost::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wpwtilikepostaspost__', $strExpandAsArrayNodes, $objPreviousChildItems, $strColumnAliasArray);
                         if ($objChildItem) {
                             $objPreviousItem->_objWpWtiLikePostAsPostArray[] = $objChildItem;
                         }
                     } else {
                         $objPreviousItem->_objWpWtiLikePostAsPostArray[] = WpWtiLikePost::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wpwtilikepostaspost__', $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 == 'wp_posts__') {
                         $strAliasPrefix = null;
                     }
                 }
             }
         }
     }
     // Create a new instance of the WpPosts object
     $objToReturn = new WpPosts();
     $objToReturn->__blnRestored = true;
     $strAlias = $strAliasPrefix . 'ID';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->intId = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAlias = $strAliasPrefix . 'post_author';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->intPostAuthor = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAlias = $strAliasPrefix . 'post_date';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->dttPostDate = $objDbRow->GetColumn($strAliasName, 'DateTime');
     $strAlias = $strAliasPrefix . 'post_date_gmt';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->dttPostDateGmt = $objDbRow->GetColumn($strAliasName, 'DateTime');
     $strAlias = $strAliasPrefix . 'post_content';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->strPostContent = $objDbRow->GetColumn($strAliasName, 'Blob');
     $strAlias = $strAliasPrefix . 'post_title';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->strPostTitle = $objDbRow->GetColumn($strAliasName, 'Blob');
     $strAlias = $strAliasPrefix . 'post_excerpt';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->strPostExcerpt = $objDbRow->GetColumn($strAliasName, 'Blob');
     $strAlias = $strAliasPrefix . 'post_status';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->strPostStatus = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAlias = $strAliasPrefix . 'comment_status';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->strCommentStatus = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAlias = $strAliasPrefix . 'ping_status';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->strPingStatus = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAlias = $strAliasPrefix . 'post_password';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->strPostPassword = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAlias = $strAliasPrefix . 'post_name';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->strPostName = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAlias = $strAliasPrefix . 'to_ping';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->strToPing = $objDbRow->GetColumn($strAliasName, 'Blob');
     $strAlias = $strAliasPrefix . 'pinged';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->strPinged = $objDbRow->GetColumn($strAliasName, 'Blob');
     $strAlias = $strAliasPrefix . 'post_modified';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->dttPostModified = $objDbRow->GetColumn($strAliasName, 'DateTime');
     $strAlias = $strAliasPrefix . 'post_modified_gmt';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->dttPostModifiedGmt = $objDbRow->GetColumn($strAliasName, 'DateTime');
     $strAlias = $strAliasPrefix . 'post_content_filtered';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->strPostContentFiltered = $objDbRow->GetColumn($strAliasName, 'Blob');
     $strAlias = $strAliasPrefix . 'post_parent';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->intPostParent = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAlias = $strAliasPrefix . 'guid';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->strGuid = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAlias = $strAliasPrefix . 'menu_order';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->intMenuOrder = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAlias = $strAliasPrefix . 'post_type';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->strPostType = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAlias = $strAliasPrefix . 'post_mime_type';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->strPostMimeType = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAlias = $strAliasPrefix . 'comment_count';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $objToReturn->intCommentCount = $objDbRow->GetColumn($strAliasName, 'Integer');
     if (isset($arrPreviousItems) && is_array($arrPreviousItems)) {
         foreach ($arrPreviousItems as $objPreviousItem) {
             if ($objToReturn->Id != $objPreviousItem->Id) {
                 continue;
             }
             $prevCnt = count($objPreviousItem->_objWpCommentsAsCommentPostArray);
             $cnt = count($objToReturn->_objWpCommentsAsCommentPostArray);
             if ($prevCnt != $cnt) {
                 continue;
             }
             if ($prevCnt == 0 || $cnt == 0 || !array_diff($objPreviousItem->_objWpCommentsAsCommentPostArray, $objToReturn->_objWpCommentsAsCommentPostArray)) {
                 continue;
             }
             $prevCnt = count($objPreviousItem->_objWpPostmetaAsPostArray);
             $cnt = count($objToReturn->_objWpPostmetaAsPostArray);
             if ($prevCnt != $cnt) {
                 continue;
             }
             if ($prevCnt == 0 || $cnt == 0 || !array_diff($objPreviousItem->_objWpPostmetaAsPostArray, $objToReturn->_objWpPostmetaAsPostArray)) {
                 continue;
             }
             $prevCnt = count($objPreviousItem->_objWpPostsAsPostParentArray);
             $cnt = count($objToReturn->_objWpPostsAsPostParentArray);
             if ($prevCnt != $cnt) {
                 continue;
             }
             if ($prevCnt == 0 || $cnt == 0 || !array_diff($objPreviousItem->_objWpPostsAsPostParentArray, $objToReturn->_objWpPostsAsPostParentArray)) {
                 continue;
             }
             $prevCnt = count($objPreviousItem->_objWpPvcDailyAsPostnumArray);
             $cnt = count($objToReturn->_objWpPvcDailyAsPostnumArray);
             if ($prevCnt != $cnt) {
                 continue;
             }
             if ($prevCnt == 0 || $cnt == 0 || !array_diff($objPreviousItem->_objWpPvcDailyAsPostnumArray, $objToReturn->_objWpPvcDailyAsPostnumArray)) {
                 continue;
             }
             $prevCnt = count($objPreviousItem->_objWpPvcTotalAsPostnumArray);
             $cnt = count($objToReturn->_objWpPvcTotalAsPostnumArray);
             if ($prevCnt != $cnt) {
                 continue;
             }
             if ($prevCnt == 0 || $cnt == 0 || !array_diff($objPreviousItem->_objWpPvcTotalAsPostnumArray, $objToReturn->_objWpPvcTotalAsPostnumArray)) {
                 continue;
             }
             $prevCnt = count($objPreviousItem->_objWpWtiLikePostAsPostArray);
             $cnt = count($objToReturn->_objWpWtiLikePostAsPostArray);
             if ($prevCnt != $cnt) {
                 continue;
             }
             if ($prevCnt == 0 || $cnt == 0 || !array_diff($objPreviousItem->_objWpWtiLikePostAsPostArray, $objToReturn->_objWpWtiLikePostAsPostArray)) {
                 continue;
             }
             // complete match - all primary key columns are the same
             return null;
         }
     }
     // Instantiate Virtual Attributes
     $strVirtualPrefix = $strAliasPrefix . '__';
     $strVirtualPrefixLength = strlen($strVirtualPrefix);
     foreach ($objDbRow->GetColumnNameArray() as $strColumnName => $mixValue) {
         if (strncmp($strColumnName, $strVirtualPrefix, $strVirtualPrefixLength) == 0) {
             $objToReturn->__strVirtualAttributeArray[substr($strColumnName, $strVirtualPrefixLength)] = $mixValue;
         }
     }
     // Prepare to Check for Early/Virtual Binding
     if (!$strAliasPrefix) {
         $strAliasPrefix = 'wp_posts__';
     }
     // Check for PostAuthorObject Early Binding
     $strAlias = $strAliasPrefix . 'post_author__ID';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         $objToReturn->objPostAuthorObject = WpUsers::InstantiateDbRow($objDbRow, $strAliasPrefix . 'post_author__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
     }
     // Check for PostParentObject Early Binding
     $strAlias = $strAliasPrefix . 'post_parent__ID';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         $objToReturn->objPostParentObject = WpPosts::InstantiateDbRow($objDbRow, $strAliasPrefix . 'post_parent__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
     }
     // Check for WpCommentsAsCommentPost Virtual Binding
     $strAlias = $strAliasPrefix . 'wpcommentsascommentpost__comment_ID';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $blnExpanded = $strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes);
     if ($blnExpanded && null === $objToReturn->_objWpCommentsAsCommentPostArray) {
         $objToReturn->_objWpCommentsAsCommentPostArray = array();
     }
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($blnExpanded) {
             $objToReturn->_objWpCommentsAsCommentPostArray[] = WpComments::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wpcommentsascommentpost__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objWpCommentsAsCommentPost = WpComments::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wpcommentsascommentpost__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for WpPostmetaAsPost Virtual Binding
     $strAlias = $strAliasPrefix . 'wppostmetaaspost__meta_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $blnExpanded = $strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes);
     if ($blnExpanded && null === $objToReturn->_objWpPostmetaAsPostArray) {
         $objToReturn->_objWpPostmetaAsPostArray = array();
     }
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($blnExpanded) {
             $objToReturn->_objWpPostmetaAsPostArray[] = WpPostmeta::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wppostmetaaspost__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objWpPostmetaAsPost = WpPostmeta::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wppostmetaaspost__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for WpPostsAsPostParent Virtual Binding
     $strAlias = $strAliasPrefix . 'wppostsaspostparent__ID';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $blnExpanded = $strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes);
     if ($blnExpanded && null === $objToReturn->_objWpPostsAsPostParentArray) {
         $objToReturn->_objWpPostsAsPostParentArray = array();
     }
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($blnExpanded) {
             $objToReturn->_objWpPostsAsPostParentArray[] = WpPosts::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wppostsaspostparent__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objWpPostsAsPostParent = WpPosts::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wppostsaspostparent__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for WpPvcDailyAsPostnum Virtual Binding
     $strAlias = $strAliasPrefix . 'wppvcdailyaspostnum__id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $blnExpanded = $strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes);
     if ($blnExpanded && null === $objToReturn->_objWpPvcDailyAsPostnumArray) {
         $objToReturn->_objWpPvcDailyAsPostnumArray = array();
     }
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($blnExpanded) {
             $objToReturn->_objWpPvcDailyAsPostnumArray[] = WpPvcDaily::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wppvcdailyaspostnum__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objWpPvcDailyAsPostnum = WpPvcDaily::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wppvcdailyaspostnum__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for WpPvcTotalAsPostnum Virtual Binding
     $strAlias = $strAliasPrefix . 'wppvctotalaspostnum__id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $blnExpanded = $strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes);
     if ($blnExpanded && null === $objToReturn->_objWpPvcTotalAsPostnumArray) {
         $objToReturn->_objWpPvcTotalAsPostnumArray = array();
     }
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($blnExpanded) {
             $objToReturn->_objWpPvcTotalAsPostnumArray[] = WpPvcTotal::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wppvctotalaspostnum__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objWpPvcTotalAsPostnum = WpPvcTotal::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wppvctotalaspostnum__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for WpWtiLikePostAsPost Virtual Binding
     $strAlias = $strAliasPrefix . 'wpwtilikepostaspost__id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     $blnExpanded = $strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes);
     if ($blnExpanded && null === $objToReturn->_objWpWtiLikePostAsPostArray) {
         $objToReturn->_objWpWtiLikePostAsPostArray = array();
     }
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($blnExpanded) {
             $objToReturn->_objWpWtiLikePostAsPostArray[] = WpWtiLikePost::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wpwtilikepostaspost__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objWpWtiLikePostAsPost = WpWtiLikePost::InstantiateDbRow($objDbRow, $strAliasPrefix . 'wpwtilikepostaspost__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     return $objToReturn;
 }