{"id":16899331,"url":"https://github.com/nicholascar/php-connegp","last_synced_at":"2025-03-20T12:20:27.196Z","repository":{"id":57026591,"uuid":"218165412","full_name":"nicholascar/php-connegp","owner":"nicholascar","description":null,"archived":false,"fork":false,"pushed_at":"2019-11-02T07:26:10.000Z","size":42,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T12:27:00.886Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicholascar.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}},"created_at":"2019-10-28T23:38:40.000Z","updated_at":"2022-09-14T16:24:09.000Z","dependencies_parsed_at":"2022-08-23T15:00:28.203Z","dependency_job_id":null,"html_url":"https://github.com/nicholascar/php-connegp","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicholascar%2Fphp-connegp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicholascar%2Fphp-connegp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicholascar%2Fphp-connegp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicholascar%2Fphp-connegp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicholascar","download_url":"https://codeload.github.com/nicholascar/php-connegp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244609596,"owners_count":20480811,"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":[],"created_at":"2024-10-13T17:48:21.037Z","updated_at":"2025-03-20T12:20:27.171Z","avatar_url":"https://github.com/nicholascar.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP ConnegP\nA library of functions for HTTP Content Negotiation by Profile (https://www.w3.org/TR/dx-prof-conneg/).\n\nThis code is online at \u003chttps://github.com/nicholascar/php-connegp\u003e.\n\nAll functions are in [src/functions.php](src/ConnegP.php) while [src/test_functions.php](src/test_functions.php) contains unit tests for most of them. The functions are documented in place but basically serve the following 3 purposes:\n\n1. supports the *list profiles* function\n    * by creating a `Link` header with Alternate Representation information, as per the [HTTP *list profile*](https://w3c.github.io/dxwg/conneg-by-ap/#http-listprofiles) part of the ConnegP specification\n    * see `make_header_list_profiles()`\n2. supports returning a *Content-Profile* header\n    * see `make_header_content_profile()`\n    * requires that the URI of the profile that the returned representation conforms to has been calculated\n3. supports *get resource by profile*\n    * by assisting with parsing `Accept-Profile` HTTP request header: `get_profiles_requested()`\n    * by checking if the requested profile matches a supported profile: `get_profile_to_return()`\n    * same for Media Types: `get_mediatypes_requested()` \u0026 `get_mediatype_to_return()`\n\n## License \u0026 Rights\nThis code was developed by Nicholas Car to assist with the Content Negotiation by Profile W3C Recommendation.\n\n### Rights\n\u0026copy; Nicholas J. Car, 2019\n\n### License\nGNU GPL 3 (see [LICENSE](LICENSE) for the deed).\n\n## Contact\nAuthor:  \n**Nicholas Car**  \n*Data System Architect*  \n[SURROUND Australia Pty Ltd](https://surroundaustralia.com)  \n[nicholas.car@surround.com](mailto:nicholas.car@surround.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicholascar%2Fphp-connegp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicholascar%2Fphp-connegp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicholascar%2Fphp-connegp/lists"}