PHPackages                             nicholascar/connegp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. nicholascar/connegp

ActiveLibrary[HTTP &amp; Networking](/categories/http)

nicholascar/connegp
===================

A library of functions for HTTP Content Negotiation by Profile (https://www.w3.org/TR/dx-prof-conneg/).

0.7(6y ago)17GPL-3.0-or-laterPHP

Since Nov 2Pushed 6y ago1 watchersCompare

[ Source](https://github.com/nicholascar/php-connegp)[ Packagist](https://packagist.org/packages/nicholascar/connegp)[ Docs](https://github.com/nicholascar/php-connegp)[ RSS](/packages/nicholascar-connegp/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

PHP ConnegP
===========

[](#php-connegp)

A library of functions for HTTP Content Negotiation by Profile ().

This code is online at .

All 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:

1. supports the *list profiles* function
    - 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
    - see `make_header_list_profiles()`
2. 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
3. supports *get resource by profile*
    - by assisting with parsing `Accept-Profile` HTTP 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()` &amp; `get_mediatype_to_return()`

License &amp; Rights
--------------------

[](#license--rights)

This code was developed by Nicholas Car to assist with the Content Negotiation by Profile W3C Recommendation.

### Rights

[](#rights)

© Nicholas J. Car, 2019

### License

[](#license)

GNU GPL 3 (see [LICENSE](LICENSE) for the deed).

Contact
-------

[](#contact)

Author:
**Nicholas Car**
*Data System Architect*
[SURROUND Australia Pty Ltd](https://surroundaustralia.com)

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2380d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/737018f1fdda23e72f458a4c965bd2af4426e0ce31587e03f9bff4f87d9ca130?d=identicon)[nicholascar](/maintainers/nicholascar)

---

Tags

httpprofileW3Ccontent negotiationdata specification

### Embed Badge

![Health badge](/badges/nicholascar-connegp/health.svg)

```
[![Health](https://phpackages.com/badges/nicholascar-connegp/health.svg)](https://phpackages.com/packages/nicholascar-connegp)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.0B3.1k](/packages/guzzlehttp-psr7)[psr/http-message

Common interface for HTTP messages

7.1k1.0B5.5k](/packages/psr-http-message)[psr/http-factory

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k692.9M1.9k](/packages/psr-http-factory)[psr/http-client

Common interface for HTTP clients

1.7k680.7M2.1k](/packages/psr-http-client)[symfony/http-client

Provides powerful methods to fetch HTTP resources synchronously or asynchronously

2.0k314.0M3.4k](/packages/symfony-http-client)[psr/link

Common interfaces for HTTP links

2.5k144.1M69](/packages/psr-link)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
