当前位置: 首页>>代码示例>>PHP>>正文


PHP Country::toArray方法代码示例

本文整理汇总了PHP中Country::toArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Country::toArray方法的具体用法?PHP Country::toArray怎么用?PHP Country::toArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Country的用法示例。


在下文中一共展示了Country::toArray方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: toArray

 public function toArray()
 {
     $array = array();
     if ($this->id != null) {
         $array['id'] = $this->getId();
     }
     if ($this->year != null) {
         $array['year'] = $this->getYear();
     }
     if ($this->subgroup != null) {
         $array['subgroup'] = $this->subgroup->toArray();
     }
     if ($this->font != null) {
         $array['font'] = $this->font->toArray();
     }
     if ($this->type != null) {
         $array['type'] = $this->type->toArray();
     }
     if ($this->variety != null) {
         $array['variety'] = $this->variety->toArray();
     }
     if ($this->origin != null) {
         $array['origin'] = $this->origin->toArray();
     }
     if ($this->destiny != null) {
         $array['destiny'] = $this->destiny->toArray();
     }
     return $array;
 }
开发者ID:raigons,项目名称:bureauinteligencia,代码行数:29,代码来源:Data.php

示例2: toArray

 /**
  * 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_STUDLYPHPNAME,
  *                    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['GoogleshoppingAccount'][$this->getPrimaryKey()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['GoogleshoppingAccount'][$this->getPrimaryKey()] = true;
     $keys = GoogleshoppingAccountTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getId(), $keys[1] => $this->getMerchantId(), $keys[2] => $this->getDefaultCountryId(), $keys[3] => $this->getDefaultCurrencyId(), $keys[4] => $this->getIsDefault());
     $virtualColumns = $this->virtualColumns;
     foreach ($virtualColumns as $key => $virtualColumn) {
         $result[$key] = $virtualColumn;
     }
     if ($includeForeignObjects) {
         if (null !== $this->aCountry) {
             $result['Country'] = $this->aCountry->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aCurrency) {
             $result['Currency'] = $this->aCurrency->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->collGoogleshoppingProductSynchronisations) {
             $result['GoogleshoppingProductSynchronisations'] = $this->collGoogleshoppingProductSynchronisations->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
     }
     return $result;
 }
开发者ID:Mertiozys,项目名称:GoogleShopping,代码行数:40,代码来源:GoogleshoppingAccount.php

示例3: toArray

 /**
  * 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 BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
  *                    BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
  *                    Defaults to BasePeer::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 = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
 {
     if (isset($alreadyDumpedObjects['State'][$this->getPrimaryKey()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['State'][$this->getPrimaryKey()] = true;
     $keys = StatePeer::getFieldNames($keyType);
     $result = array($keys[0] => $this->getId(), $keys[1] => $this->getName(), $keys[2] => $this->getIsoCode(), $keys[3] => $this->getIsoShortCode(), $keys[4] => $this->getCountryId(), $keys[5] => $this->getCreatedAt(), $keys[6] => $this->getUpdatedAt());
     if ($includeForeignObjects) {
         if (null !== $this->aCountry) {
             $result['Country'] = $this->aCountry->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->collContacts) {
             $result['Contacts'] = $this->collContacts->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
         }
     }
     return $result;
 }
开发者ID:homer6,项目名称:blank_altumo,代码行数:33,代码来源:BaseState.php

示例4: toArray

 /**
  * 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_STUDLYPHPNAME,
  *                    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['AddressSocolissimo'][$this->getPrimaryKey()])) {
         return '*RECURSION*';
     }
     $alreadyDumpedObjects['AddressSocolissimo'][$this->getPrimaryKey()] = true;
     $keys = AddressSocolissimoTableMap::getFieldNames($keyType);
     $result = array($keys[0] => $this->getId(), $keys[1] => $this->getTitleId(), $keys[2] => $this->getCompany(), $keys[3] => $this->getFirstname(), $keys[4] => $this->getLastname(), $keys[5] => $this->getAddress1(), $keys[6] => $this->getAddress2(), $keys[7] => $this->getAddress3(), $keys[8] => $this->getZipcode(), $keys[9] => $this->getCity(), $keys[10] => $this->getCountryId(), $keys[11] => $this->getCode(), $keys[12] => $this->getType(), $keys[13] => $this->getCellphone());
     $virtualColumns = $this->virtualColumns;
     foreach ($virtualColumns as $key => $virtualColumn) {
         $result[$key] = $virtualColumn;
     }
     if ($includeForeignObjects) {
         if (null !== $this->aCustomerTitle) {
             $result['CustomerTitle'] = $this->aCustomerTitle->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
         if (null !== $this->aCountry) {
             $result['Country'] = $this->aCountry->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
         }
     }
     return $result;
 }
开发者ID:ThomasArnaud,项目名称:SoColissimo,代码行数:37,代码来源:AddressSocolissimo.php


注:本文中的Country::toArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。