public function is($name)
    {
        $name = strtolower($name);

        if (!array_key_exists($name, $this->patterns)) {
            throw new \InvalidArgumentException(sprintf('Unrecognized browser, OS, mobile or tablet name "%s"', $name));
        }

        if (preg_match('/' . $this->patterns[$name] . '/i', $this->userAgent, $matches)) {
            $this->versions[$name] = isset($matches[1]) ? $matches[1] : false;
            return true;
        } else {
            $this->versions[$name] = false;
            return false;
        }
    }