| @@ 115-124 (lines=10) @@ | ||
| 112 | * |
|
| 113 | * @return string |
|
| 114 | */ |
|
| 115 | protected static function buildFields(array $fields) |
|
| 116 | { |
|
| 117 | $query = []; |
|
| 118 | ||
| 119 | foreach ($fields as $fieldName => $field) { |
|
| 120 | $query[] = $field->getValueExpression(":{$fieldName}"); |
|
| 121 | } |
|
| 122 | ||
| 123 | return implode(', ', $query); |
|
| 124 | } |
|
| 125 | } |
|
| 126 | ||
| @@ 88-97 (lines=10) @@ | ||
| 85 | * |
|
| 86 | * @return string |
|
| 87 | */ |
|
| 88 | public static function buildFields(array $fields, $prefix = '') |
|
| 89 | { |
|
| 90 | $query = []; |
|
| 91 | ||
| 92 | foreach ($fields as $fieldName => $field) { |
|
| 93 | $query[] = "`{$fieldName}` = ".$field->getValueExpression(":{$prefix}{$fieldName}"); |
|
| 94 | } |
|
| 95 | ||
| 96 | return implode(', ', $query); |
|
| 97 | } |
|
| 98 | } |
|
| 99 | ||