Example #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['RRightsForbook'][$this->hashCode()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['RRightsForbook'][$this->hashCode()] = true;
     $keys = RRightsForbookTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getRightid(), $keys[1] => $this->getBookid());
     $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->aBooks) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'books';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = '_books';
                     break;
                 default:
                     $key = 'Books';
             }
             $result[$key] = $this->aBooks->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
     }
     return $result;
 }
Example #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['Formats'][$this->hashCode()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['Formats'][$this->hashCode()] = true;
     $keys = FormatsTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getId(), $keys[1] => $this->getName(), $keys[2] => $this->getForbook(), $keys[3] => $this->getUserSys(), $keys[4] => $this->getConfigSys(), $keys[5] => $this->getSplit(), $keys[6] => $this->getSort(), $keys[7] => $this->getParentnode());
     $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->aBooks) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'books';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = '_books';
                     break;
                 default:
                     $key = 'Books';
             }
             $result[$key] = $this->aBooks->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->collRRightsForformats) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'rRightsForformats';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'R_rights_forformats';
                     break;
                 default:
                     $key = 'RRightsForformats';
             }
             $result[$key] = $this->collRRightsForformats->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collRTemplatenamesInchapters) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'rTemplatenamesInchapters';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'R_templatenames_inchapters';
                     break;
                 default:
                     $key = 'RTemplatenamesInchapters';
             }
             $result[$key] = $this->collRTemplatenamesInchapters->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collContributionss) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'contributionss';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = '_contributionss';
                     break;
                 default:
                     $key = 'Contributionss';
             }
             $result[$key] = $this->collContributionss->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
     }
     return $result;
 }
Example #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['Issues'][$this->hashCode()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['Issues'][$this->hashCode()] = true;
     $keys = IssuesTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getId(), $keys[1] => $this->getName(), $keys[2] => $this->getOpendate(), $keys[3] => $this->getClosedate(), $keys[4] => $this->getStatus(), $keys[5] => $this->getInfotext(), $keys[6] => $this->getForbook(), $keys[7] => $this->getUserSys(), $keys[8] => $this->getConfigSys(), $keys[9] => $this->getSplit(), $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->aBooks) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'books';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = '_books';
                     break;
                 default:
                     $key = 'Books';
             }
             $result[$key] = $this->aBooks->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->collRIssuesAllplugins) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'rIssuesAllplugins';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'R_issues_allplugins';
                     break;
                 default:
                     $key = 'RIssuesAllplugins';
             }
             $result[$key] = $this->collRIssuesAllplugins->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collRIssuesNarrationplugins) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'rIssuesNarrationplugins';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'R_issues_narrationplugins';
                     break;
                 default:
                     $key = 'RIssuesNarrationplugins';
             }
             $result[$key] = $this->collRIssuesNarrationplugins->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collRIssuesRtfplugins) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'rIssuesRtfplugins';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'R_issues_rtfplugins';
                     break;
                 default:
                     $key = 'RIssuesRtfplugins';
             }
             $result[$key] = $this->collRIssuesRtfplugins->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collRIssuesSingleplugins) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'rIssuesSingleplugins';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'R_issues_singleplugins';
                     break;
                 default:
                     $key = 'RIssuesSingleplugins';
             }
             $result[$key] = $this->collRIssuesSingleplugins->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collRIssuesXmlplugins) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'rIssuesXmlplugins';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'R_issues_xmlplugins';
                     break;
                 default:
                     $key = 'RIssuesXmlplugins';
             }
             $result[$key] = $this->collRIssuesXmlplugins->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collRRightsForissues) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'rRightsForissues';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = 'R_rights_forissues';
                     break;
                 default:
                     $key = 'RRightsForissues';
             }
             $result[$key] = $this->collRRightsForissues->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
         if (null !== $this->collContributionss) {
             switch ($keyType) {
                 case TableMap::TYPE_CAMELNAME:
                     $key = 'contributionss';
                     break;
                 case TableMap::TYPE_FIELDNAME:
                     $key = '_contributionss';
                     break;
                 default:
                     $key = 'Contributionss';
             }
             $result[$key] = $this->collContributionss->toArray(null, false, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
     }
     return $result;
 }