src/Parser/FieldParser.php
private function createPreference(array $variantTokenList, array $paramBundleList, $serverField, $fromField)
    {
        $builder = $this->getBuilder($fromField)
            ->setFromField($fromField)
            ->setFromServer($serverField)
            ->setVariant(implode('', $variantTokenList));

        // Look for quality factor, discarding accept-extens
        foreach ($paramBundleList as $paramBundle) {
            // Correct format for quality factor
            if ($this->isQualityFactor($paramBundle)) {
                $builder = $builder->setQualityFactor($paramBundle[2]);
                break;
            }
        }

        return $builder->get();
    }
private function createPreference(array $variantTokenList, array $paramBundleList, $serverField, $fromField)
    {
        $builder = $this->getBuilder($fromField)
            ->setFromField($fromField)
            ->setFromServer($serverField)
            ->setVariant(implode('', $variantTokenList));

        // Look for quality factor, discarding accept-extens
        foreach ($paramBundleList as $paramBundle) {
            // Correct format for quality factor
            if ($this->isQualityFactor($paramBundle)) {
                $builder = $builder->setQualityFactor($paramBundle[2]);
                break;
            }
        }

        return $builder->get();
    }
private function createPreference ( array $ variantTokenList , array $ paramBundleList , $ serverField , $ fromField ) { $ builder = $ this -> getBuilder ( $ fromField ) -> setFromField ( $ fromField ) -> setFromServer ( $ serverField ) -> setVariant ( implode ( '' , $ variantTokenList ) ) ; // Look for quality factor, discarding accept-extens foreach ( $ paramBundleList as $ paramBundle ) { // Correct format for quality factor if ( $ this -> isQualityFactor ( $ paramBundle ) ) { $ builder = $ builder -> setQualityFactor ( $ paramBundle [ 2 ] ) ; break ; } } return $ builder -> get ( ) ; }
Accepts the bundled tokens for variant & parameter data and builds the Preference value object.

@param array<string> $variantTokenList
@param array<array<string>> $paramBundleList
@param bool $serverField
@param string $fromField

@return PreferenceInterface
Accepts the bundled tokens for variant & parameter data and builds the Preference value object .