| @@ 79-92 (lines=14) @@ | ||
| 76 | * |
|
| 77 | *@return $this Chaining |
|
| 78 | */ |
|
| 79 | public function select($fieldNames) |
|
| 80 | { |
|
| 81 | // Convert argument to array and iterate |
|
| 82 | foreach ((!is_array($fieldNames) ? array($fieldNames) : $fieldNames) as $fieldName) { |
|
| 83 | // Try to find entity additional field |
|
| 84 | $pointer = &static::$fieldNames[$fieldName]; |
|
| 85 | if (null !== $pointer) { |
|
| 86 | // Store selected additional field buy FieldID and Field name |
|
| 87 | $this->selectedFields[$pointer] = $fieldName; |
|
| 88 | } |
|
| 89 | } |
|
| 90 | ||
| 91 | return $this; |
|
| 92 | } |
|
| 93 | ||
| 94 | /** |
|
| 95 | * Set additional field for sorting. |
|
| @@ 74-87 (lines=14) @@ | ||
| 71 | * |
|
| 72 | * @return $this Chaining |
|
| 73 | */ |
|
| 74 | public function select($fieldNames) |
|
| 75 | { |
|
| 76 | // TODO: Query has no implementation for selecting needed fields |
|
| 77 | ||
| 78 | // Convert argument to array and iterate |
|
| 79 | foreach ((!is_array($fieldNames) ? array($fieldNames) : $fieldNames) as $fieldName) { |
|
| 80 | // Try to find entity additional field |
|
| 81 | $pointer = &static::$fieldNames[$fieldName]; |
|
| 82 | if (null !== $pointer) { |
|
| 83 | // Store selected additional field buy FieldID and Field name |
|
| 84 | $this->selectedFields[$pointer] = $fieldName; |
|
| 85 | } |
|
| 86 | } |
|
| 87 | ||
| 88 | return $this; |
|
| 89 | } |
|
| 90 | ||