| @@ 1428-1439 (lines=12) @@ | ||
| 1425 | * @param array $query_params sub-array from @see EEM_Base::get_all() |
|
| 1426 | * @return array |
|
| 1427 | */ |
|
| 1428 | public function prepareRestQueryParamsKeyForModels($model, $query_params) |
|
| 1429 | { |
|
| 1430 | $model_ready_query_params = array(); |
|
| 1431 | foreach ($query_params as $key => $value) { |
|
| 1432 | if (is_array($value)) { |
|
| 1433 | $model_ready_query_params[ $key ] = $this->prepareRestQueryParamsKeyForModels($model, $value); |
|
| 1434 | } else { |
|
| 1435 | $model_ready_query_params[ $key ] = $value; |
|
| 1436 | } |
|
| 1437 | } |
|
| 1438 | return $model_ready_query_params; |
|
| 1439 | } |
|
| 1440 | ||
| 1441 | ||
| 1442 | /** |
|
| @@ 1448-1459 (lines=12) @@ | ||
| 1445 | * @param $query_params |
|
| 1446 | * @return array |
|
| 1447 | */ |
|
| 1448 | public function prepareRestQueryParamsValuesForModels($model, $query_params) |
|
| 1449 | { |
|
| 1450 | $model_ready_query_params = array(); |
|
| 1451 | foreach ($query_params as $key => $value) { |
|
| 1452 | if (is_array($value)) { |
|
| 1453 | $model_ready_query_params[ $key ] = $this->prepareRestQueryParamsValuesForModels($model, $value); |
|
| 1454 | } else { |
|
| 1455 | $model_ready_query_params[ $key ] = $value; |
|
| 1456 | } |
|
| 1457 | } |
|
| 1458 | return $model_ready_query_params; |
|
| 1459 | } |
|
| 1460 | ||
| 1461 | ||
| 1462 | /** |
|