PHP code example of willdurand / stack-negotiation

1. Go to this page and download the library: Download willdurand/stack-negotiation library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

willdurand / stack-negotiation example snippets


use Negotiation\Stack\Negotiation;

$app = new Negotiation($app);

$app = new Negotiation($app, null, null, null, [
    'language_priorities' => [ '... '],
    'format_priorities'   => [ '... '],
]);