/** * 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['RRightsFortemplate'][$this->hashCode()])) { return '*RECURSION*'; } $alreadyDumpedObjects['RRightsFortemplate'][$this->hashCode()] = true; $keys = RRightsFortemplateTableMap::getFieldNames($keyType); $result = array($keys[0] => $this->getRightid(), $keys[1] => $this->getTemplateid()); $virtualColumns = $this->virtualColumns; foreach ($virtualColumns as $key => $virtualColumn) { $result[$key] = $virtualColumn; } if ($includeForeignObjects) { if (null !== $this->aRights) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'rights'; break; case TableMap::TYPE_FIELDNAME: $key = '_rights'; break; default: $key = 'Rights'; } $result[$key] = $this->aRights->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); } if (null !== $this->aTemplatenames) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'templatenames'; break; case TableMap::TYPE_FIELDNAME: $key = '_templatenames'; break; default: $key = 'Templatenames'; } $result[$key] = $this->aTemplatenames->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['Contributions'][$this->hashCode()])) { return '*RECURSION*'; } $alreadyDumpedObjects['Contributions'][$this->hashCode()] = true; $keys = ContributionsTableMap::getFieldNames($keyType); $result = array($keys[0] => $this->getId(), $keys[1] => $this->getFortemplate(), $keys[2] => $this->getForissue(), $keys[3] => $this->getName(), $keys[4] => $this->getStatus(), $keys[5] => $this->getNewdate(), $keys[6] => $this->getModdate(), $keys[7] => $this->getUserSys(), $keys[8] => $this->getConfigSys(), $keys[9] => $this->getForchapter(), $keys[10] => $this->getParentnode(), $keys[11] => $this->getSort()); $virtualColumns = $this->virtualColumns; foreach ($virtualColumns as $key => $virtualColumn) { $result[$key] = $virtualColumn; } if ($includeForeignObjects) { if (null !== $this->auserSysRef) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'users'; break; case TableMap::TYPE_FIELDNAME: $key = 'users'; break; default: $key = 'Users'; } $result[$key] = $this->auserSysRef->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); } if (null !== $this->aFormats) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'formats'; break; case TableMap::TYPE_FIELDNAME: $key = '_formats'; break; default: $key = 'Formats'; } $result[$key] = $this->aFormats->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); } if (null !== $this->aIssues) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'issues'; break; case TableMap::TYPE_FIELDNAME: $key = '_issues'; break; default: $key = 'Issues'; } $result[$key] = $this->aIssues->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); } if (null !== $this->aTemplatenames) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'templatenames'; break; case TableMap::TYPE_FIELDNAME: $key = '_templatenames'; break; default: $key = 'Templatenames'; } $result[$key] = $this->aTemplatenames->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); } if (null !== $this->collDatas) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'datas'; break; case TableMap::TYPE_FIELDNAME: $key = '_datas'; break; default: $key = 'Datas'; } $result[$key] = $this->collDatas->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['Templates'][$this->hashCode()])) { return '*RECURSION*'; } $alreadyDumpedObjects['Templates'][$this->hashCode()] = true; $keys = TemplatesTableMap::getFieldNames($keyType); $result = array($keys[0] => $this->getId(), $keys[1] => $this->getFortemplate(), $keys[2] => $this->getFieldname(), $keys[3] => $this->getHelpdescription(), $keys[4] => $this->getHelpimage(), $keys[5] => $this->getFieldtype(), $keys[6] => $this->getConfigSys(), $keys[7] => $this->getSplit(), $keys[8] => $this->getParentnode(), $keys[9] => $this->getSort()); $virtualColumns = $this->virtualColumns; foreach ($virtualColumns as $key => $virtualColumn) { $result[$key] = $virtualColumn; } if ($includeForeignObjects) { if (null !== $this->aTemplatenames) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'templatenames'; break; case TableMap::TYPE_FIELDNAME: $key = '_templatenames'; break; default: $key = 'Templatenames'; } $result[$key] = $this->aTemplatenames->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); } if (null !== $this->collRFieldpostprocessorForfields) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'rFieldpostprocessorForfields'; break; case TableMap::TYPE_FIELDNAME: $key = 'R_fieldpostprocessor_forfields'; break; default: $key = 'RFieldpostprocessorForfields'; } $result[$key] = $this->collRFieldpostprocessorForfields->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); } if (null !== $this->collDatas) { switch ($keyType) { case TableMap::TYPE_CAMELNAME: $key = 'datas'; break; case TableMap::TYPE_FIELDNAME: $key = '_datas'; break; default: $key = 'Datas'; } $result[$key] = $this->collDatas->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); } } return $result; }