PHPackages                             vperyod/accept-handler - 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. vperyod/accept-handler

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

vperyod/accept-handler
======================

PSR7 Aura\\Accept Handler

0.1.0(10y ago)176MITPHP

Since Jun 20Pushed 9y ago1 watchersCompare

[ Source](https://github.com/vperyod/vperyod.accept-handler)[ Packagist](https://packagist.org/packages/vperyod/accept-handler)[ Docs](https://github.com/vperyod/vperyod.accept-handler)[ RSS](/packages/vperyod-accept-handler/feed)WikiDiscussions develop Synced 3w ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

vperyod.accept-handler
======================

[](#vperyodaccept-handler)

[Aura\\Accept](https://github.com/auraphp/Aura.Accept) Content Negotiation Middleware

[![Latest version](https://camo.githubusercontent.com/ffc810f752a794669a22bddd54df94e521ba22f94799a62e94c6b661d8dc529d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76706572796f642f6163636570742d68616e646c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vperyod/accept-handler)[![Build Status](https://camo.githubusercontent.com/2fff2a6069201cfe4a14d7e5779e36204d43081481b1499bea63ae325cf3a424/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f76706572796f642f76706572796f642e6163636570742d68616e646c65722f646576656c6f702e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/vperyod/vperyod.accept-handler)[![Coverage Status](https://camo.githubusercontent.com/7f95e7d31d5883a691672294562c5a097b6020236ff4090a483d08eb36a7d7f1/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f76706572796f642f76706572796f642e6163636570742d68616e646c65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/vperyod/vperyod.accept-handler)[![Quality Score](https://camo.githubusercontent.com/4d176fe8133bab432655bdc1fa773b6a60b6525f34f12143782ef083a8279fff/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f76706572796f642f76706572796f642e6163636570742d68616e646c65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/vperyod/vperyod.accept-handler)

Installation
------------

[](#installation)

```
composer require vperyod/accept-handler

```

Usage
-----

[](#usage)

See [Aura\\Accept](https://github.com/auraphp/Aura.Accept) documentation.

```
// Create handler
$handler = new Vperyod\AcceptHandler\AcceptHandler();

// Optionally set the attribute on which to store the `Accept` object
// Defaults to 'aura/accept:accept'
$handler->setAcceptAttribute('accept');

// Add to your middleware stack, radar, relay, etc.
$stack->middleware($handler);

// Subsequent dealings with `Request` will have the `Accept` instance available
// at the previous specified atribute
$accept = $request->getAttribute('accept');

// The `AcceptRequestAwareTrait` should make dealings easier.
//
// Have all your objects that deal with the accept attribute on the request use
// the `AcceptRequestAwareTrait` and have your DI container use the setter, so that
// they all know where the Accept object is stored.
//
// Additionally, the trait supplies negotiate methods to eaily access the the
// `Accept` Negotiation methods.

class MyResponder
{
    use \Vperyod\AcceptHandler\AcceptRequestAwareTrait;

    protected $availableLangs = [
        //...
    ];

    protected $availableCharset = [
        //...
    ];

    protected $availableMedia = [
        //...
    ];

    public function __invoke($request, $response, $payload)
    {
        // get the accept object
        $accept = $this->getAccept($request);

        // or more convieniant methods
        $language = $this->negotiateLanguage($request, $this->availableLangs);
        $charset = $this->negotiateCharset($request, $this->availableCharset)
        $media = $this->negotiateMedia($request, $this->availableMedia);
        //...
    }
}
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Unknown

Total

1

Last Release

3655d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/64baf5fff415327ccc832998afe54b34ac3c621e401f128a9343d4e0b0a3f9e4?d=identicon)[jnj](/maintainers/jnj)

---

Top Contributors

[![jakejohns](https://avatars.githubusercontent.com/u/174708?v=4)](https://github.com/jakejohns "jakejohns (9 commits)")

### Embed Badge

![Health badge](/badges/vperyod-accept-handler/health.svg)

```
[![Health](https://phpackages.com/badges/vperyod-accept-handler/health.svg)](https://phpackages.com/packages/vperyod-accept-handler)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.1B3.7k](/packages/guzzlehttp-psr7)[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[symfony/psr-http-message-bridge

PSR HTTP message bridge

1.3k312.3M929](/packages/symfony-psr-http-message-bridge)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35729.6k2](/packages/telnyx-telnyx-php)[laudis/neo4j-php-client

Neo4j-PHP-Client is the most advanced PHP Client for Neo4j

185671.3k41](/packages/laudis-neo4j-php-client)

PHPackages © 2026

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