public function getBestMatch(array $formats)
    {
        foreach ($this->items as $item) {
            if (in_array($item['media_range'], $formats)) {
                return $item['media_range'];
            }
        }

        return false;
    }
public function getBestMatch(array $formats)
    {
        foreach ($this->items as $item) {
            if (in_array($item['media_range'], $formats)) {
                return $item['media_range'];
            }
        }

        return false;
    }
public function getBestMatch ( array $ formats ) { foreach ( $ this -> items as $ item ) { if ( in_array ( $ item [ 'media_range' ] , $ formats ) ) { return $ item [ 'media_range' ] ; } } return false ; }
Returns the best format out of a list of supplied formats.

@param  array          $formats
@return string|boolean
Returns the best format out of a list of supplied formats .