SproutCMS

This is the code documentation for the SproutCMS project

function userAgent()

Retrieves current user agent information:
keys:  browser, version, platform, mobile, robot, referrer, languages, charsets
tests: is_browser, is_mobile, is_robot, accept_lang, accept_charset

Usage

string|boolean|array Kohana::userAgent ( [ string $key [, string $compare ]] );

Authors

Arguments

  1. string $key = agent
    key or test name
  2. string $compare = NULL
    used with "accept" tests: userAgent(accept_lang, en)

Return value

  • array
    languages and charsets
  • string
    all other keys
  • boolean
    all tests