public static function isWindows(Request $request) {

        if (false === $request->headers->has("user-agent")) {
            return false;
        }

        $dd = new DeviceDetector($request->headers->get("user-agent"));
        $dd->parse();

        $os = $dd->getOs("name");

        return 1 === preg_match("/Windows/", $os);
    }
public static function isWindows(Request $request) {

        if (false === $request->headers->has("user-agent")) {
            return false;
        }

        $dd = new DeviceDetector($request->headers->get("user-agent"));
        $dd->parse();

        $os = $dd->getOs("name");

        return 1 === preg_match("/Windows/", $os);
    }
public static function isWindows ( Request $ request ) { if ( false === $ request -> headers -> has ( "user-agent" ) ) { return false ; } $ dd = new DeviceDetector ( $ request -> headers -> get ( "user-agent" ) ) ; $ dd -> parse ( ) ; $ os = $ dd -> getOs ( "name" ) ; return 1 === preg_match ( "/Windows/" , $ os ) ; }
Determines if the operating system is windows.

@param Request $request The request.
@return bool Returns true in case of success, false otherwise.
Determines if the operating system is windows .