{"id":16266496,"url":"https://github.com/donnikitos/php-url","last_synced_at":"2026-04-12T16:13:16.961Z","repository":{"id":188512866,"uuid":"678782224","full_name":"donnikitos/php-url","owner":"donnikitos","description":"PHP URL class to parse, construct, normalize, and encode URLs - but just like in JavaScript","archived":false,"fork":false,"pushed_at":"2023-08-15T15:56:12.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T15:44:10.910Z","etag":null,"topics":["javascript","php","php-javascript","url","url-engine","url-modifier","url-parser"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/donnikitos/url","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/donnikitos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-15T11:13:35.000Z","updated_at":"2023-08-15T19:21:23.000Z","dependencies_parsed_at":"2023-08-15T17:45:58.430Z","dependency_job_id":null,"html_url":"https://github.com/donnikitos/php-url","commit_stats":null,"previous_names":["donnikitos/php-url"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donnikitos%2Fphp-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donnikitos%2Fphp-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donnikitos%2Fphp-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donnikitos%2Fphp-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/donnikitos","download_url":"https://codeload.github.com/donnikitos/php-url/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247865894,"owners_count":21009235,"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":["javascript","php","php-javascript","url","url-engine","url-modifier","url-parser"],"created_at":"2024-10-10T17:42:10.224Z","updated_at":"2026-04-12T16:13:16.914Z","avatar_url":"https://github.com/donnikitos.png","language":"PHP","readme":"# URL\n\nThe URL class is used to parse, construct, normalize, and encode URLs. It works by providing properties which allow you to easily read and modify the components of a URL.\n\nYou normally create a new URL object by specifying the URL as a string when calling its constructor, or by providing a relative URL and a base URL. You can then easily read the parsed components of the URL or make changes to the URL.\n\n### Instance properties\n\n##### `hash`\n\nA string containing the fragment identifier of the URL.\n\n##### `host`\n\nA string containing the domain (that is the hostname) followed by (if a port was specified) a ':' and the port of the URL.\n\n##### `hostname`\n\nA string containing the domain of the URL.\n\n##### `href`\n\nA stringifier that returns a string containing the whole URL.\n\n##### `origin`\n\nReturns a string containing the origin of the URL, that is its scheme, its domain and its port.\n\n##### `password`\n\nA string containing the password specified before the domain name.\n\n##### `pathname`\n\nA string containing an initial '/' followed by the path of the URL, not including the query string or fragment.\n\n##### `port`\n\nA string containing the port number of the URL.\n\n##### `protocol`\n\nA string containing the protocol scheme of the URL.\n\n##### `search`\n\nA string indicating the URL's parameter string; if any parameters are provided, this string includes all of them.\n\n##### `searchParams`\n\nA URLSearchParams object which can be used to access the individual query parameters found in search.\n\n##### `username`\n\nA string containing the username specified before the domain name.\n\n### Instance methods\n\n##### `toString()`\n\nReturns a string containing the whole URL. It is a synonym for URL.href, though it can't be used to modify the value.\n\n##### `toJSON()`\n\nReturns a JSON string containing a serialized version of the URL object.\n\n# URLSearchParams\n\nThe URLSearchParams interface defines utility methods to work with the query string of a URL.\n\n### Instance properties\n\n##### `size`\n\nIndicates the total number of search parameter entries.\n\n### Instance methods\n\n##### `append(string $name, string | int | bool $value)`\n\nAppends a specified key/value pair as a new search parameter.\n\n##### `delete(string $name, null | string | int | bool $value = null)`\n\nDeletes search parameters that match a name, and optional value, from the list of all search parameters.\n\n##### `entries()`\n\nReturns an iterator allowing iteration through all key/value pairs contained in this object in the same order as they appear in the query string.\n\n##### `get(string $name)`\n\nReturns the first value associated with the given search parameter.\n\n\u003c!-- ##### `getAll()`\n\nReturns all the values associated with a given search parameter. --\u003e\n\n##### `has(string $name)`\n\nReturns a boolean value indicating if a given parameter, or parameter and value pair, exists.\n\n##### `keys()`\n\nReturns an iterator allowing iteration through all keys of the key/value pairs contained in this object.\n\n##### `set(string $name, string | int | bool $value)`\n\nSets the value associated with a given search parameter to the given value. If there are several values, the others are deleted.\n\n##### `toString()`\n\nReturns a string containing a query string suitable for use in a URL.\n\n##### `values()`\n\nReturns an iterator allowing iteration through all values of the key/value pairs contained in this object.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonnikitos%2Fphp-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonnikitos%2Fphp-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonnikitos%2Fphp-url/lists"}