SproutCMS

This is the code documentation for the SproutCMS project

function preferredAccept()

Compare the q values for given array of content types and return the one with the highest value.
If items are found to have the same q value, the first one encountered in the given array wins.
If all items in the given array have a q value of 0, FALSE is returned.

Usage

mixed Request::preferredAccept ( array $types [, boolean $explicit_check ] );

Arguments

  1. array $types
    content types
  2. boolean $explicit_check = FALSE
    set to TRUE to disable wildcard checking

Return value

  • mixed
    string mime type with highest q value, FALSE if none of the given types are accepted