| @@ 1073-1095 (lines=23) @@ | ||
| 1070 | * @param string $keyType The type of keys the array uses. |
|
| 1071 | * @return void |
|
| 1072 | */ |
|
| 1073 | public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) |
|
| 1074 | { |
|
| 1075 | $keys = BannerImageI18nTableMap::getFieldNames($keyType); |
|
| 1076 | ||
| 1077 | if (array_key_exists($keys[0], $arr)) { |
|
| 1078 | $this->setId($arr[$keys[0]]); |
|
| 1079 | } |
|
| 1080 | if (array_key_exists($keys[1], $arr)) { |
|
| 1081 | $this->setLocale($arr[$keys[1]]); |
|
| 1082 | } |
|
| 1083 | if (array_key_exists($keys[2], $arr)) { |
|
| 1084 | $this->setSrc($arr[$keys[2]]); |
|
| 1085 | } |
|
| 1086 | if (array_key_exists($keys[3], $arr)) { |
|
| 1087 | $this->setName($arr[$keys[3]]); |
|
| 1088 | } |
|
| 1089 | if (array_key_exists($keys[4], $arr)) { |
|
| 1090 | $this->setClicks($arr[$keys[4]]); |
|
| 1091 | } |
|
| 1092 | if (array_key_exists($keys[5], $arr)) { |
|
| 1093 | $this->setDescription($arr[$keys[5]]); |
|
| 1094 | } |
|
| 1095 | } |
|
| 1096 | ||
| 1097 | /** |
|
| 1098 | * Populate the current object from a string, using a given parser format |
|
| @@ 1138-1160 (lines=23) @@ | ||
| 1135 | * @param string $keyType The type of keys the array uses. |
|
| 1136 | * @return void |
|
| 1137 | */ |
|
| 1138 | public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) |
|
| 1139 | { |
|
| 1140 | $keys = BannersTableMap::getFieldNames($keyType); |
|
| 1141 | ||
| 1142 | if (array_key_exists($keys[0], $arr)) { |
|
| 1143 | $this->setId($arr[$keys[0]]); |
|
| 1144 | } |
|
| 1145 | if (array_key_exists($keys[1], $arr)) { |
|
| 1146 | $this->setPlace($arr[$keys[1]]); |
|
| 1147 | } |
|
| 1148 | if (array_key_exists($keys[2], $arr)) { |
|
| 1149 | $this->setWidth($arr[$keys[2]]); |
|
| 1150 | } |
|
| 1151 | if (array_key_exists($keys[3], $arr)) { |
|
| 1152 | $this->setHeight($arr[$keys[3]]); |
|
| 1153 | } |
|
| 1154 | if (array_key_exists($keys[4], $arr)) { |
|
| 1155 | $this->setEffects($arr[$keys[4]]); |
|
| 1156 | } |
|
| 1157 | if (array_key_exists($keys[5], $arr)) { |
|
| 1158 | $this->setPageType($arr[$keys[5]]); |
|
| 1159 | } |
|
| 1160 | } |
|
| 1161 | ||
| 1162 | /** |
|
| 1163 | * Populate the current object from a string, using a given parser format |
|