/** * 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['SkillReference'][$this->hashCode()])) { return '*RECURSION*'; } $alreadyDumpedObjects['SkillReference'][$this->hashCode()] = true; $keys = SkillReferenceTableMap::getFieldNames($keyType); $result = array($keys[0] => $this->getSkillId(), $keys[1] => $this->getReferenceId()); $virtualColumns = $this->virtualColumns; foreach ($virtualColumns as $key => $virtualColumn) { $result[$key] = $virtualColumn; } if ($includeForeignObjects) { if (null !== $this->aSkill) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'skill'; break; case TableMap::TYPE_FIELDNAME: $key = 'kk_trixionary_skill'; break; default: $key = 'Skill'; } $result[$key] = $this->aSkill->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); } if (null !== $this->aReference) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'reference'; break; case TableMap::TYPE_FIELDNAME: $key = 'kk_trixionary_reference'; break; default: $key = 'Reference'; } $result[$key] = $this->aReference->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['Kstruktur'][$this->hashCode()])) { return '*RECURSION*'; } $alreadyDumpedObjects['Kstruktur'][$this->hashCode()] = true; $keys = KstrukturTableMap::getFieldNames($keyType); $result = array($keys[0] => $this->getId(), $keys[1] => $this->getType(), $keys[2] => $this->getSkillId(), $keys[3] => $this->getTitle()); $virtualColumns = $this->virtualColumns; foreach ($virtualColumns as $key => $virtualColumn) { $result[$key] = $virtualColumn; } if ($includeForeignObjects) { if (null !== $this->aStructureNode) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'structureNode'; break; case TableMap::TYPE_FIELDNAME: $key = 'kk_trixionary_structure_node'; break; default: $key = 'StructureNode'; } $result[$key] = $this->aStructureNode->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); } if (null !== $this->aSkillRelatedBySkillId) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'skill'; break; case TableMap::TYPE_FIELDNAME: $key = 'kk_trixionary_skill'; break; default: $key = 'Skill'; } $result[$key] = $this->aSkillRelatedBySkillId->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); } if (null !== $this->collRootSkills) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'skills'; break; case TableMap::TYPE_FIELDNAME: $key = 'kk_trixionary_skills'; break; default: $key = 'Skills'; } $result[$key] = $this->collRootSkills->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); } } 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['SkillVersion'][$this->hashCode()])) { return '*RECURSION*'; } $alreadyDumpedObjects['SkillVersion'][$this->hashCode()] = true; $keys = SkillVersionTableMap::getFieldNames($keyType); $result = array($keys[0] => $this->getId(), $keys[1] => $this->getSportId(), $keys[2] => $this->getName(), $keys[3] => $this->getAlternativeName(), $keys[4] => $this->getSlug(), $keys[5] => $this->getDescription(), $keys[6] => $this->getHistory(), $keys[7] => $this->getIsTranslation(), $keys[8] => $this->getIsRotation(), $keys[9] => $this->getIsAcyclic(), $keys[10] => $this->getIsCyclic(), $keys[11] => $this->getLongitudinalFlags(), $keys[12] => $this->getLatitudinalFlags(), $keys[13] => $this->getTransversalFlags(), $keys[14] => $this->getMovementDescription(), $keys[15] => $this->getSequencePictureUrl(), $keys[16] => $this->getVariationOfId(), $keys[17] => $this->getStartPositionId(), $keys[18] => $this->getEndPositionId(), $keys[19] => $this->getIsComposite(), $keys[20] => $this->getIsMultiple(), $keys[21] => $this->getMultipleOfId(), $keys[22] => $this->getMultiplier(), $keys[23] => $this->getGeneration(), $keys[24] => $this->getImportance(), $keys[25] => $this->getPictureId(), $keys[26] => $this->getVideoId(), $keys[27] => $this->getTutorialId(), $keys[28] => $this->getKstrukturId(), $keys[29] => $this->getFunctionPhaseId(), $keys[30] => $this->getObjectId(), $keys[31] => $this->getVersion(), $keys[32] => $this->getVersionCreatedAt(), $keys[33] => $this->getVersionComment(), $keys[34] => $this->getVariationOfIdVersion(), $keys[35] => $this->getMultipleOfIdVersion(), $keys[36] => $this->getKkTrixionarySkillIds(), $keys[37] => $this->getKkTrixionarySkillVersions()); $utc = new \DateTimeZone('utc'); if ($result[$keys[32]] instanceof \DateTime) { // When changing timezone we don't want to change existing instances $dateTime = clone $result[$keys[32]]; $result[$keys[32]] = $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->aSkill) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'skill'; break; case TableMap::TYPE_FIELDNAME: $key = 'kk_trixionary_skill'; break; default: $key = 'Skill'; } $result[$key] = $this->aSkill->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['Picture'][$this->hashCode()])) { return '*RECURSION*'; } $alreadyDumpedObjects['Picture'][$this->hashCode()] = true; $keys = PictureTableMap::getFieldNames($keyType); $result = array($keys[0] => $this->getId(), $keys[1] => $this->getTitle(), $keys[2] => $this->getDescription(), $keys[3] => $this->getUrl(), $keys[4] => $this->getThumbUrl(), $keys[5] => $this->getSkillId(), $keys[6] => $this->getPhotographer(), $keys[7] => $this->getPhotographerId(), $keys[8] => $this->getAthlete(), $keys[9] => $this->getAthleteId(), $keys[10] => $this->getUploaderId()); $virtualColumns = $this->virtualColumns; foreach ($virtualColumns as $key => $virtualColumn) { $result[$key] = $virtualColumn; } if ($includeForeignObjects) { if (null !== $this->aSkill) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'skill'; break; case TableMap::TYPE_FIELDNAME: $key = 'kk_trixionary_skill'; break; default: $key = 'Skill'; } $result[$key] = $this->aSkill->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); } if (null !== $this->collFeaturedSkills) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'skills'; break; case TableMap::TYPE_FIELDNAME: $key = 'kk_trixionary_skills'; break; default: $key = 'Skills'; } $result[$key] = $this->collFeaturedSkills->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); } } return $result; }