src/Preference/Matched/MatchedPreference.php
public function getVariant()
    {
        // Special handling for language partial matches. These require that the returned variant name is the portion of
        // the language before the wildcard as this is what the application will be using to encode the response.
        if ($this->isLanguageWildcard()) {
            return str_replace('-*', '', $this->serverPref->getVariant());

        // If the client contained a wildcard or is absent return the concrete variant from teh server.
        } elseif ($this->clientWildcardOrAbsent()) {
            return $this->serverPref->getVariant();

        // In all other cases the client is canonical
        } else {
            return $this->clientPref->getVariant();
        }
    }
public function getVariant()
    {
        // Special handling for language partial matches. These require that the returned variant name is the portion of
        // the language before the wildcard as this is what the application will be using to encode the response.
        if ($this->isLanguageWildcard()) {
            return str_replace('-*', '', $this->serverPref->getVariant());

        // If the client contained a wildcard or is absent return the concrete variant from teh server.
        } elseif ($this->clientWildcardOrAbsent()) {
            return $this->serverPref->getVariant();

        // In all other cases the client is canonical
        } else {
            return $this->clientPref->getVariant();
        }
    }
public function getVariant ( ) { // Special handling for language partial matches. These require that the returned variant name is the portion of // the language before the wildcard as this is what the application will be using to encode the response. if ( $ this -> isLanguageWildcard ( ) ) { return str_replace ( '-*' , '' , $ this -> serverPref -> getVariant ( ) ) ; // If the client contained a wildcard or is absent return the concrete variant from teh server. } elseif ( $ this -> clientWildcardOrAbsent ( ) ) { return $ this -> serverPref -> getVariant ( ) ; // In all other cases the client is canonical } else { return $ this -> clientPref -> getVariant ( ) ; } }
Get the shared variant for this pair.

@return string
Get the shared variant for this pair .