Back to Browser class

Method _setPlatform

protected void
_setPlatform
()
Match the platform of the browser.
Returns
  • void
Since
  • 1.7.0
Class: Browser
Project: Joomla

Method _setPlatform - Source code

/**
 * Match the platform of the browser.
 *
 * This is a pretty simplistic implementation, but it's intended
 * to let us tell what line breaks to send, so it's good enough
 * for its purpose.
 *
 * @return  void
 *
 * @since   1.7.0
 */
protected function _setPlatform()
{
    if (strpos($this->lowerAgent, 'wind') !== false) {
        $this->platform = 'win';
    } elseif (strpos($this->lowerAgent, 'mac') !== false) {
        $this->platform = 'mac';
    } else {
        $this->platform = 'unix';
    }
}