{"id":15025749,"url":"https://github.com/bpolaszek/querystring","last_synced_at":"2025-04-09T20:04:32.722Z","repository":{"id":26765560,"uuid":"109999368","full_name":"bpolaszek/querystring","owner":"bpolaszek","description":"PHP 7.1+ Query String manipulation library. No dependency, immutable, lightweight, PSR-7 compliant.","archived":false,"fork":false,"pushed_at":"2024-12-05T15:39:44.000Z","size":46,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-23T21:52:03.771Z","etag":null,"topics":["immutable","lightweight","php","php7","php71","psr-7","querystring","uri","url"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bpolaszek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-08T16:14:35.000Z","updated_at":"2024-12-05T15:38:34.000Z","dependencies_parsed_at":"2025-02-15T19:31:27.397Z","dependency_job_id":"a5eb3eb3-f22e-40e8-8e8b-959d5c994779","html_url":"https://github.com/bpolaszek/querystring","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpolaszek%2Fquerystring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpolaszek%2Fquerystring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpolaszek%2Fquerystring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpolaszek%2Fquerystring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bpolaszek","download_url":"https://codeload.github.com/bpolaszek/querystring/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247694866,"owners_count":20980732,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["immutable","lightweight","php","php7","php71","psr-7","querystring","uri","url"],"created_at":"2024-09-24T20:02:57.645Z","updated_at":"2025-04-09T20:04:32.701Z","avatar_url":"https://github.com/bpolaszek.png","language":"PHP","readme":"[![Latest Stable Version](https://poser.pugx.org/bentools/querystring/v/stable)](https://packagist.org/packages/bentools/querystring)\n[![License](https://poser.pugx.org/bentools/querystring/license)](https://packagist.org/packages/bentools/querystring)\n[![CI Workflow](https://github.com/bpolaszek/querystring/actions/workflows/ci-workflow.yml/badge.svg)](https://github.com/bpolaszek/querystring/actions/workflows/ci-workflow.yml)\n[![Coverage](https://codecov.io/gh/bpolaszek/querystring/branch/master/graph/badge.svg?token=9AXQUHY1R7)](https://codecov.io/gh/bpolaszek/querystring)\n[![Quality Score](https://img.shields.io/scrutinizer/g/bpolaszek/querystring.svg?style=flat-square)](https://scrutinizer-ci.com/g/bpolaszek/querystring)\n[![Total Downloads](https://poser.pugx.org/bentools/querystring/downloads)](https://packagist.org/packages/bentools/querystring)\n\n# QueryString\n\nA lightweight, object-oriented, Query String manipulation library.\n\n## Why?\n\nBecause I needed an intuitive way to add or remove parameters from a query string, in any project. \n\nOh, and, I also wanted that `['foos' =\u003e ['foo', 'bar']]` resolved to `foos[]=foo\u0026foos[]=bar` instead of `foos[0]=foo\u0026foos[1]=bar`, unlike many libraries do.\n\nThanks to object-oriented design, you can define the way query strings are [parsed](doc/Instantiation.md) and [rendered](doc/RenderAsString.md#change-renderer).\n\n## Usage\n\nSimple as that:\n```php\nrequire_once __DIR__ . '/vendor/autoload.php';\n\nuse function BenTools\\QueryString\\query_string;\n\n$qs = query_string(\n    'foo=bar\u0026baz=bat'\n);\n$qs = $qs-\u003ewithParam('foo', 'foofoo')\n    -\u003ewithoutParam('baz')\n    -\u003ewithParam('ho', 'hi');\n\nprint_r($qs-\u003egetParams());\n/* Array\n(\n    [foo] =\u003e foofoo\n    [ho] =\u003e hi\n) */\n\nprint $qs; // foo=foofoo\u0026ho=hi\n```\n\n## Documentation\n\n[Instantiation / Parsing](doc/Instantiation.md)\n\n[Manipulate parameters](doc/ManipulateParameters.md)\n\n[Render as string](doc/RenderAsString.md)\n\n## Installation\nPHP 7.1+ is required.\n\u003e composer require bentools/querystring:^1.0\n\n## Tests\n\u003e ./vendor/bin/phpunit\n\n## License\nMIT\n\n## See also\n\n[bentools/uri-factory](https://github.com/bpolaszek/uri-factory) - A PSR-7 `UriInterface` factory based on your own dependencies.\n\n[bentools/pager](https://github.com/bpolaszek/bentools-pager) - A simple, object oriented Pager.\n\n[bentools/where](https://github.com/bpolaszek/where) - A framework-agnostic fluent, immutable, SQL query builder.\n\n[bentools/picker](https://github.com/bpolaszek/picker) - Pick a random item from an array, with weight management.\n\n[bentools/psr7-request-matcher](https://github.com/bpolaszek/psr7-request-matcher) - A PSR-7 request matcher interface.\n\n[bentools/cartesian-product](https://github.com/bpolaszek/cartesian-product) - Generate all possible combinations from a multidimensionnal array.\n\n[bentools/string-combinations](https://github.com/bpolaszek/string-combinations) - A string combinations generator.\n\n[bentools/flatten-iterator](https://github.com/bpolaszek/flatten-iterator) - An iterator that flattens multiple iterators or arrays. \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbpolaszek%2Fquerystring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbpolaszek%2Fquerystring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbpolaszek%2Fquerystring/lists"}