| @@ 291-306 (lines=16) @@ | ||
| 288 |     { | |
| 289 | $column = array_flip($column); | |
| 290 | ||
| 291 |         foreach ($input[$this->column] as $key => $value) { | |
| 292 |             if (!array_key_exists($key, $column)) { | |
| 293 | continue; | |
| 294 | } | |
| 295 | ||
| 296 | $newKey = $key . $column[$key]; | |
| 297 | ||
| 298 | /* | |
| 299 | * set new key | |
| 300 | */ | |
| 301 |             array_set($input, "{$this->column}.$newKey", $value); | |
| 302 | /* | |
| 303 | * forget the old key and value | |
| 304 | */ | |
| 305 |             array_forget($input, "{$this->column}.$key"); | |
| 306 | } | |
| 307 | } | |
| 308 | ||
| 309 | /** | |
| @@ 352-377 (lines=26) @@ | ||
| 349 | /* | |
| 350 | * foreach the field set to find the corresponding $column | |
| 351 | */ | |
| 352 |             foreach ($set as $name => $value) { | |
| 353 | /* | |
| 354 | * if doesn't have column name, continue to the next loop | |
| 355 | */ | |
| 356 |                 if (!array_key_exists($name, $column)) { | |
| 357 | continue; | |
| 358 | } | |
| 359 | ||
| 360 | /** | |
| 361 | * example: $newKey = created_atstart. | |
| 362 | * | |
| 363 | * Σ( ° △ °|||)︴ | |
| 364 | * | |
| 365 | * I don't know why a form need range input? Only can imagine is for range search.... | |
| 366 | */ | |
| 367 | $newKey = $name . $column[$name]; | |
| 368 | ||
| 369 | /* | |
| 370 | * set new key | |
| 371 | */ | |
| 372 |                 array_set($input, "{$this->column}.$index.$newKey", $value); | |
| 373 | /* | |
| 374 | * forget the old key and value | |
| 375 | */ | |
| 376 |                 array_forget($input, "{$this->column}.$index.$name"); | |
| 377 | } | |
| 378 | } | |
| 379 | } | |
| 380 | ||