open-api-tools/query-parser

Query string parser with open-api format support

Maintainers

Package info

github.com/open-api-tools/query-parser

pkg:composer/open-api-tools/query-parser

Fund package maintenance!

Other

Patreon

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2021-07-31 08:52 UTC

This package is not auto-updated.

Last update: 2026-03-23 04:56:03 UTC


README

the standard PHP function parse_str() function replaces the same parameter names in the query string. To get an array, you need to add [] to the parameter name, which is not in accordance with the Open-API specification.

This library solves the indicated problem.

$parser = new \OpenApiTools\QueryParser\OpenApiQueryParser();
$parser->parse('id=1&id=2&id=3');

// returns
[
  'id' => [
    '1',
    '2',
    '3',
  ],
];