Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
OsInfo Class Reference

Public Member Functions

 __construct ()
 
 isWindows ()
 

Protected Attributes

 $os
 

Detailed Description

Wrapper on PHP_OS constant

Definition at line 11 of file OsInfo.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Initialize os

Definition at line 23 of file OsInfo.php.

24  {
25  $this->os = PHP_OS;
26  }

Member Function Documentation

◆ isWindows()

isWindows ( )

Check id system is Windows

Returns
bool

Definition at line 33 of file OsInfo.php.

34  {
35  return strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
36  }

Field Documentation

◆ $os

$os
protected

Definition at line 18 of file OsInfo.php.


The documentation for this class was generated from the following file: