@return array */
(string $reference)
| 17 | |
| 18 | /** @return array<string,mixed> */ |
| 19 | public function resolve(string $reference): array { |
| 20 | if (!preg_match('/^c_([1-9][0-9]*)$/D', $reference, $matches)) { |
| 21 | throw new FlexibleStorageException('invalid_column_reference', 'Invalid flexible column reference.', ['column' => $reference]); |
| 22 | } |
| 23 | $id = (int)$matches[1]; |
| 24 | foreach ($this->columns as $column) { |
| 25 | if ((int)$column['id'] === $id) { |
| 26 | return $column; |
| 27 | } |
| 28 | } |
| 29 | throw new FlexibleStorageException('unknown_column', 'The referenced column does not belong to this dataset.', ['column' => $reference]); |
| 30 | } |
| 31 | |
| 32 | /** @return list<array<string,mixed>> */ |
| 33 | public function all(): array { |
no outgoing calls
no test coverage detected