src/main/php/routing/SupportedMimeTypes.php
public function findMatch(AcceptHeader $acceptedMimeTypes)
    {
        if (count($this->mimeTypes) === 0) {
            return 'text/html';
        }

        if (count($acceptedMimeTypes) === 0) {
            reset($this->mimeTypes);
            return current($this->mimeTypes);
        }

        return $acceptedMimeTypes->findMatchWithGreatestPriority($this->mimeTypes);
    }
public function findMatch(AcceptHeader $acceptedMimeTypes)
    {
        if (count($this->mimeTypes) === 0) {
            return 'text/html';
        }

        if (count($acceptedMimeTypes) === 0) {
            reset($this->mimeTypes);
            return current($this->mimeTypes);
        }

        return $acceptedMimeTypes->findMatchWithGreatestPriority($this->mimeTypes);
    }
public function findMatch ( AcceptHeader $ acceptedMimeTypes ) { if ( count ( $ this -> mimeTypes ) === 0 ) { return 'text/html' ; } if ( count ( $ acceptedMimeTypes ) === 0 ) { reset ( $ this -> mimeTypes ) ; return current ( $ this -> mimeTypes ) ; } return $ acceptedMimeTypes -> findMatchWithGreatestPriority ( $ this -> mimeTypes ) ; }
finds best matching mime type based on accept header

@param   \stubbles\peer\http\AcceptHeader  $acceptedMimeTypes
@return  string|null
finds best matching mime type based on accept header