DeviceDetector.php
public function getOs($attr = '')
    {
        if ($attr == '') {
            return $this->os;
        }

        if (!isset($this->os[$attr])) {
            return self::UNKNOWN;
        }

        return $this->os[$attr];
    }
public function getOs($attr = '')
    {
        if ($attr == '') {
            return $this->os;
        }

        if (!isset($this->os[$attr])) {
            return self::UNKNOWN;
        }

        return $this->os[$attr];
    }
public function getOs ( $ attr = '' ) { if ( $ attr == '' ) { return $ this -> os ; } if ( ! isset ( $ this -> os [ $ attr ] ) ) { return self :: UNKNOWN ; } return $ this -> os [ $ attr ] ; }
Returns the operating system data extracted from the parsed UA

If $attr is given only that property will be returned

@param string $attr property to return(optional)

@return array|string
Returns the operating system data extracted from the parsed UA