Exemplo n.º 1
0
 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
  *                    TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
  *                    Defaults to TableMap::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['Rigs'][$this->hashCode()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['Rigs'][$this->hashCode()] = true;
     $keys = RigsTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getId(), $keys[1] => $this->getUserId(), $keys[2] => $this->getTitle());
     $virtualColumns = $this->virtualColumns;
     foreach ($virtualColumns as $key => $virtualColumn) {
         $result[$key] = $virtualColumn;
     }
     if ($includeForeignObjects) {
         if (null !== $this->aUser) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'user';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'user';
                     break;
                 default:
                     $key = 'User';
             }
             $result[$key] = $this->aUser->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->collRatingHeaderss) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'ratingHeaderss';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'rating_headerss';
                     break;
                 default:
                     $key = 'RatingHeaderss';
             }
             $result[$key] = $this->collRatingHeaderss->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collRigAttributeValuess) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'rigAttributeValuess';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'rig_attribute_valuess';
                     break;
                 default:
                     $key = 'RigAttributeValuess';
             }
             $result[$key] = $this->collRigAttributeValuess->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
     }
     return $result;
 }
Exemplo n.º 2
0
 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
  *                    TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
  *                    Defaults to TableMap::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['UserWeights'][$this->hashCode()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['UserWeights'][$this->hashCode()] = true;
     $keys = UserWeightsTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getId(), $keys[1] => $this->getRatingCategoryId(), $keys[2] => $this->getUserId(), $keys[3] => $this->getWeight());
     $virtualColumns = $this->virtualColumns;
     foreach ($virtualColumns as $key => $virtualColumn) {
         $result[$key] = $virtualColumn;
     }
     if ($includeForeignObjects) {
         if (null !== $this->aRatingCategories) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'ratingCategories';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'rating_categories';
                     break;
                 default:
                     $key = 'RatingCategories';
             }
             $result[$key] = $this->aRatingCategories->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aUser) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'user';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'user';
                     break;
                 default:
                     $key = 'User';
             }
             $result[$key] = $this->aUser->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
     }
     return $result;
 }
Exemplo n.º 3
0
 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
  *                    TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
  *                    Defaults to TableMap::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['Items'][$this->hashCode()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['Items'][$this->hashCode()] = true;
     $keys = ItemsTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getItemId(), $keys[1] => $this->getCategoryId(), $keys[2] => $this->getUserId(), $keys[3] => $this->getItemName(), $keys[4] => $this->getPrice(), $keys[5] => $this->getDescription(), $keys[6] => $this->getDateAdded(), $keys[7] => $this->getDateSold(), $keys[8] => $this->getSubcategoryId(), $keys[9] => $this->getImageUrl());
     if ($result[$keys[6]] instanceof \DateTime) {
         $result[$keys[6]] = $result[$keys[6]]->format('c');
     }
     if ($result[$keys[7]] instanceof \DateTime) {
         $result[$keys[7]] = $result[$keys[7]]->format('c');
     }
     $virtualColumns = $this->virtualColumns;
     foreach ($virtualColumns as $key => $virtualColumn) {
         $result[$key] = $virtualColumn;
     }
     if ($includeForeignObjects) {
         if (null !== $this->aCategories) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'categories';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'Categories';
                     break;
                 default:
                     $key = 'Categories';
             }
             $result[$key] = $this->aCategories->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aSubcategories) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'subcategories';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'SubCategories';
                     break;
                 default:
                     $key = 'Subcategories';
             }
             $result[$key] = $this->aSubcategories->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aUser) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'user';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'User';
                     break;
                 default:
                     $key = 'User';
             }
             $result[$key] = $this->aUser->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
     }
     return $result;
 }
Exemplo n.º 4
0
 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
  *                    TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
  *                    Defaults to TableMap::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['UserReviews'][$this->hashCode()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['UserReviews'][$this->hashCode()] = true;
     $keys = UserReviewsTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getId(), $keys[1] => $this->getGameId(), $keys[2] => $this->getPlatformId(), $keys[3] => $this->getUserId(), $keys[4] => $this->getRigId(), $keys[5] => $this->getRating(), $keys[6] => $this->getReview(), $keys[7] => $this->getUpvotes(), $keys[8] => $this->getDownvotes());
     $virtualColumns = $this->virtualColumns;
     foreach ($virtualColumns as $key => $virtualColumn) {
         $result[$key] = $virtualColumn;
     }
     if ($includeForeignObjects) {
         if (null !== $this->aGames) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'games';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'games';
                     break;
                 default:
                     $key = 'Games';
             }
             $result[$key] = $this->aGames->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aPlatforms) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'platforms';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'platforms';
                     break;
                 default:
                     $key = 'Platforms';
             }
             $result[$key] = $this->aPlatforms->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aUser) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'user';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'user';
                     break;
                 default:
                     $key = 'User';
             }
             $result[$key] = $this->aUser->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aRatings) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'ratings';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'ratings';
                     break;
                 default:
                     $key = 'Ratings';
             }
             $result[$key] = $this->aRatings->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
     }
     return $result;
 }
 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
  *                    TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
  *                    Defaults to TableMap::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['EventInterest'][$this->hashCode()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['EventInterest'][$this->hashCode()] = true;
     $keys = EventInterestTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getEventInterestId(), $keys[1] => $this->getInterestedUserId(), $keys[2] => $this->getTargetEventId());
     $virtualColumns = $this->virtualColumns;
     foreach ($virtualColumns as $key => $virtualColumn) {
         $result[$key] = $virtualColumn;
     }
     if ($includeForeignObjects) {
         if (null !== $this->aInterested) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'user';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'user';
                     break;
                 default:
                     $key = 'User';
             }
             $result[$key] = $this->aInterested->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aTarget_Event) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'event';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'event';
                     break;
                 default:
                     $key = 'Event';
             }
             $result[$key] = $this->aTarget_Event->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
     }
     return $result;
 }
Exemplo n.º 6
0
 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
  *                    TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
  *                    Defaults to TableMap::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['TourQuery'][$this->hashCode()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['TourQuery'][$this->hashCode()] = true;
     $keys = TourQueryTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getID(), $keys[1] => $this->getPlaceToGo(), $keys[2] => $this->getGoingFrom(), $keys[3] => $this->getGoingTo(), $keys[4] => $this->getReturnFrom(), $keys[5] => $this->getReturnTo(), $keys[6] => $this->getUserId(), $keys[7] => $this->getCreatedAt(), $keys[8] => $this->getUpdatedAt());
     if ($result[$keys[7]] instanceof \DateTime) {
         $result[$keys[7]] = $result[$keys[7]]->format('c');
     }
     if ($result[$keys[8]] instanceof \DateTime) {
         $result[$keys[8]] = $result[$keys[8]]->format('c');
     }
     $virtualColumns = $this->virtualColumns;
     foreach ($virtualColumns as $key => $virtualColumn) {
         $result[$key] = $virtualColumn;
     }
     if ($includeForeignObjects) {
         if (null !== $this->aUser) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'user';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'user';
                     break;
                 default:
                     $key = 'User';
             }
             $result[$key] = $this->aUser->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
     }
     return $result;
 }
Exemplo n.º 7
0
 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
  *                    TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
  *                    Defaults to TableMap::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['News'][$this->hashCode()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['News'][$this->hashCode()] = true;
     $keys = NewsTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getId(), $keys[1] => $this->getTitle(), $keys[2] => $this->getDatetime(), $keys[3] => $this->getUserId(), $keys[4] => $this->getContent(), $keys[5] => $this->getTags());
     $utc = new \DateTimeZone('utc');
     if ($result[$keys[2]] instanceof \DateTime) {
         // When changing timezone we don't want to change existing instances
         $dateTime = clone $result[$keys[2]];
         $result[$keys[2]] = $dateTime->setTimezone($utc)->format('Y-m-d\\TH:i:s\\Z');
     }
     $virtualColumns = $this->virtualColumns;
     foreach ($virtualColumns as $key => $virtualColumn) {
         $result[$key] = $virtualColumn;
     }
     if ($includeForeignObjects) {
         if (null !== $this->aUser) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'user';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'user';
                     break;
                 default:
                     $key = 'User';
             }
             $result[$key] = $this->aUser->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
     }
     return $result;
 }
Exemplo n.º 8
0
 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
  *                    TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
  *                    Defaults to TableMap::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['RatingHeaders'][$this->hashCode()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['RatingHeaders'][$this->hashCode()] = true;
     $keys = RatingHeadersTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getId(), $keys[1] => $this->getGameId(), $keys[2] => $this->getUserId(), $keys[3] => $this->getGamePlatformId(), $keys[4] => $this->getRigId(), $keys[5] => $this->getCreated(), $keys[6] => $this->getUpdated(), $keys[7] => $this->getUpvotes(), $keys[8] => $this->getDownvotes(), $keys[9] => $this->getComments(), $keys[10] => $this->getScore());
     $utc = new \DateTimeZone('utc');
     if ($result[$keys[5]] instanceof \DateTime) {
         // When changing timezone we don't want to change existing instances
         $dateTime = clone $result[$keys[5]];
         $result[$keys[5]] = $dateTime->setTimezone($utc)->format('Y-m-d\\TH:i:s\\Z');
     }
     if ($result[$keys[6]] instanceof \DateTime) {
         // When changing timezone we don't want to change existing instances
         $dateTime = clone $result[$keys[6]];
         $result[$keys[6]] = $dateTime->setTimezone($utc)->format('Y-m-d\\TH:i:s\\Z');
     }
     $virtualColumns = $this->virtualColumns;
     foreach ($virtualColumns as $key => $virtualColumn) {
         $result[$key] = $virtualColumn;
     }
     if ($includeForeignObjects) {
         if (null !== $this->aGames) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'games';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'games';
                     break;
                 default:
                     $key = 'Games';
             }
             $result[$key] = $this->aGames->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aUser) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'user';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'user';
                     break;
                 default:
                     $key = 'User';
             }
             $result[$key] = $this->aUser->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aRigs) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'rigs';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'rigs';
                     break;
                 default:
                     $key = 'Rigs';
             }
             $result[$key] = $this->aRigs->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aPlatforms) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'platforms';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'platforms';
                     break;
                 default:
                     $key = 'Platforms';
             }
             $result[$key] = $this->aPlatforms->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->collRatingCategoryValuess) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'ratingCategoryValuess';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'rating_category_valuess';
                     break;
                 default:
                     $key = 'RatingCategoryValuess';
             }
             $result[$key] = $this->collRatingCategoryValuess->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
     }
     return $result;
 }
Exemplo n.º 9
0
 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
  *                    TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
  *                    Defaults to TableMap::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['ContestQueue'][$this->hashCode()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['ContestQueue'][$this->hashCode()] = true;
     $keys = ContestQueueTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getId(), $keys[1] => $this->getUserId(), $keys[2] => $this->getGameId(), $keys[3] => $this->getPlatformId(), $keys[4] => $this->getMessage(), $keys[5] => $this->getAssignedUserId(), $keys[6] => $this->getResolved());
     $virtualColumns = $this->virtualColumns;
     foreach ($virtualColumns as $key => $virtualColumn) {
         $result[$key] = $virtualColumn;
     }
     if ($includeForeignObjects) {
         if (null !== $this->aUser) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'user';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'user';
                     break;
                 default:
                     $key = 'User';
             }
             $result[$key] = $this->aUser->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
     }
     return $result;
 }
 /**
  * Exports the object as an array.
  *
  * You can specify the key type of the array by passing one of the class
  * type constants.
  *
  * @param     string  $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_CAMELNAME,
  *                    TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
  *                    Defaults to TableMap::TYPE_PHPNAME.
  * @param     boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  * @param     array $alreadyDumpedObjects List of objects to skip to avoid recursion
  * @param     boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  *
  * @return array an associative array containing the field names (as keys) and field values
  */
 public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['Event'][$this->hashCode()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['Event'][$this->hashCode()] = true;
     $keys = EventTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getEventId(), $keys[1] => $this->getTitle(), $keys[2] => $this->getDate(), $keys[3] => $this->getStartTime(), $keys[4] => $this->getEndTime(), $keys[5] => $this->getLocation(), $keys[6] => $includeLazyLoadColumns ? $this->getDescription() : null, $keys[7] => $this->getMaxAttendance(), $keys[8] => $this->getCreatorUserId());
     $virtualColumns = $this->virtualColumns;
     foreach ($virtualColumns as $key => $virtualColumn) {
         $result[$key] = $virtualColumn;
     }
     if ($includeForeignObjects) {
         if (null !== $this->aCreator) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'user';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'user';
                     break;
                 default:
                     $key = 'User';
             }
             $result[$key] = $this->aCreator->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->collInterests) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'eventInterests';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'event_interests';
                     break;
                 default:
                     $key = 'EventInterests';
             }
             $result[$key] = $this->collInterests->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collComments) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'comments';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'comments';
                     break;
                 default:
                     $key = 'Comments';
             }
             $result[$key] = $this->collComments->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
     }
     return $result;
 }