Download the PHP package nicholascar/connegp without Composer
On this page you can find all versions of the php package nicholascar/connegp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nicholascar/connegp
More information about nicholascar/connegp
Files in nicholascar/connegp
Package connegp
Short Description A library of functions for HTTP Content Negotiation by Profile (https://www.w3.org/TR/dx-prof-conneg/).
License GPL-3.0-or-later
Homepage https://github.com/nicholascar/php-connegp
Informations about the package connegp
PHP ConnegP
A library of functions for HTTP Content Negotiation by Profile (https://www.w3.org/TR/dx-prof-conneg/).
This code is online at https://github.com/nicholascar/php-connegp.
All functions are in src/test_functions.php contains unit tests for most of them. The functions are documented in place but basically serve the following 3 purposes:
- supports the list profiles function
- by creating a
Linkheader with Alternate Representation information, as per the HTTP list profile part of the ConnegP specification - see
make_header_list_profiles()
- by creating a
- supports returning a Content-Profile header
- see
make_header_content_profile() - requires that the URI of the profile that the returned representation conforms to has been calculated
- see
- supports get resource by profile
- by assisting with parsing
Accept-ProfileHTTP request header:get_profiles_requested() - by checking if the requested profile matches a supported profile:
get_profile_to_return() - same for Media Types:
get_mediatypes_requested()&get_mediatype_to_return()
- by assisting with parsing
License & Rights
This code was developed by Nicholas Car to assist with the Content Negotiation by Profile W3C Recommendation.
Rights
© Nicholas J. Car, 2019
License
GNU GPL 3 (see LICENSE for the deed).
Contact
Author:
Nicholas Car
Data System Architect
SURROUND Australia Pty Ltd
[email protected]