12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Framework;
- /**
- * Wrapper on PHP_OS constant
- */
- class OsInfo
- {
- /**
- * Operation system
- *
- * @var string
- */
- protected $os;
- /**
- * Initialize os
- */
- public function __construct()
- {
- $this->os = PHP_OS;
- }
- /**
- * Check id system is Windows
- *
- * @return bool
- */
- public function isWindows()
- {
- return strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
- }
- }
|