{"id":20789523,"url":"https://github.com/kusabi/uri","last_synced_at":"2026-05-22T01:37:14.020Z","repository":{"id":57009978,"uuid":"177978015","full_name":"kusabi/uri","owner":"kusabi","description":"A PSR-7 and PSR-17 conforming uri library for PHP","archived":false,"fork":false,"pushed_at":"2020-10-31T13:20:06.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T10:27:18.245Z","etag":null,"topics":["php","psr-17","psr-7","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/kusabi.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":null,"code_of_conduct":".github/code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-27T11:14:34.000Z","updated_at":"2020-10-31T13:20:08.000Z","dependencies_parsed_at":"2022-08-21T15:10:15.120Z","dependency_job_id":null,"html_url":"https://github.com/kusabi/uri","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kusabi%2Furi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kusabi%2Furi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kusabi%2Furi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kusabi%2Furi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kusabi","download_url":"https://codeload.github.com/kusabi/uri/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243135358,"owners_count":20241949,"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":["php","psr-17","psr-7","uri","url"],"created_at":"2024-11-17T15:24:39.594Z","updated_at":"2025-12-26T02:14:03.744Z","avatar_url":"https://github.com/kusabi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Uri wrapper\n\n![Tests](https://github.com/kusabi/uri/workflows/tests/badge.svg)\n[![codecov](https://codecov.io/gh/kusabi/uri/branch/main/graph/badge.svg)](https://codecov.io/gh/kusabi/uri)\n[![Licence Badge](https://img.shields.io/github/license/kusabi/uri.svg)](https://img.shields.io/github/license/kusabi/uri.svg)\n[![Release Badge](https://img.shields.io/github/release/kusabi/uri.svg)](https://img.shields.io/github/release/kusabi/uri.svg)\n[![Tag Badge](https://img.shields.io/github/tag/kusabi/uri.svg)](https://img.shields.io/github/tag/kusabi/uri.svg)\n[![Issues Badge](https://img.shields.io/github/issues/kusabi/uri.svg)](https://img.shields.io/github/issues/kusabi/uri.svg)\n[![Code Size](https://img.shields.io/github/languages/code-size/kusabi/uri.svg?label=size)](https://img.shields.io/github/languages/code-size/kusabi/uri.svg)\n\n\u003csup\u003eAn implementation of a [PSR-7](https://www.php-fig.org/psr/psr-7/) \u0026 [PSR-17](https://www.php-fig.org/psr/psr-17/) conforming Uri library\u003c/sup\u003e\n\n## Installation\n\nInstallation is simple using composer.\n\n```bash\ncomposer require kusabi/uri\n```\n\nOr simply add it to your `composer.json` file\n\n```json\n{\n    \"require\": {\n        \"kusabi/uri\": \"^1.0\"\n    }\n}\n```\n\n## Using the Uri class\n\nThe Uri class is a very basic wrapper around a Uri string.\n\n\n```php\nuse Kusabi\\Uri\\Uri;\n\n// Instantiate a Uri instance\n$uri = new Uri('https://user:pass@www.my-site.com:8080/users/22?filter=name#bottom');\n\n// Fetch the properties of the Uri instance\necho $uri-\u003egetScheme();\necho $uri-\u003egetAuthority();\necho $uri-\u003egetUserInfo();\necho $uri-\u003egetHost();\necho $uri-\u003egetPort();\necho $uri-\u003egetPath();\necho $uri-\u003egetQuery();\necho $uri-\u003egetFragment();\n```\n\n\n## Using the Uri factory\n\nThe Uri factory can be used to create the Uri instance too.\n\n\n```php\nuse Kusabi\\Uri\\UriFactory;\n\n// Instantiate a Uri instance\n$factory = new UriFactory();\n$uri = $factory-\u003ecreateUri('https://user:pass@www.my-site.com:8080/users/22?filter=name#bottom');\n\n// Fetch the properties of the Uri instance\necho $uri-\u003egetScheme();\necho $uri-\u003egetAuthority();\necho $uri-\u003egetUserInfo();\necho $uri-\u003egetHost();\necho $uri-\u003egetPort();\necho $uri-\u003egetPath();\necho $uri-\u003egetQuery();\necho $uri-\u003egetFragment();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkusabi%2Furi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkusabi%2Furi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkusabi%2Furi/lists"}