mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-12 23:08:41 +00:00
Draft for Tasks/Cronjobs factory
This commit is contained in:
parent
7d8a25afe6
commit
78e0d51c92
32
System/OperatingSystem.php
Normal file
32
System/OperatingSystem.php
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 7.0
|
||||||
|
*
|
||||||
|
* @category TBD
|
||||||
|
* @package TBD
|
||||||
|
* @author OMS Development Team <dev@oms.com>
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
* @copyright 2013 Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link http://orange-management.com
|
||||||
|
*/
|
||||||
|
namespace phpOMS\System;
|
||||||
|
|
||||||
|
final class OperatingSystem {
|
||||||
|
public static function getSystem() : int
|
||||||
|
{
|
||||||
|
switch(PHP_OS) {
|
||||||
|
case stristr(PHP_OS, 'DAR'):
|
||||||
|
return SystemType::OSX;
|
||||||
|
case stristr(PHP_OS, 'WIN'):
|
||||||
|
return SystemType::WIN;
|
||||||
|
case stristr(PHP_OS, 'LINIX'):
|
||||||
|
return SystemType::LINUX;
|
||||||
|
default:
|
||||||
|
return SystemType::UNKNOWN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
39
System/SystemType.php
Normal file
39
System/SystemType.php
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 7.0
|
||||||
|
*
|
||||||
|
* @category TBD
|
||||||
|
* @package TBD
|
||||||
|
* @author OMS Development Team <dev@oms.com>
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
* @copyright 2013 Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link http://orange-management.com
|
||||||
|
*/
|
||||||
|
namespace phpOMS\System;
|
||||||
|
|
||||||
|
use phpOMS\Datatypes\Enum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Database type enum.
|
||||||
|
*
|
||||||
|
* Database types that are supported by the application
|
||||||
|
*
|
||||||
|
* @category Framework
|
||||||
|
* @package phpOMS\DataStorage\Database
|
||||||
|
* @author OMS Development Team <dev@oms.com>
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @link http://orange-management.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
abstract class SystemType extends Enum
|
||||||
|
{
|
||||||
|
const UNKNOWN = 1;
|
||||||
|
const WIN = 2;
|
||||||
|
const LINUX = 3;
|
||||||
|
const OSX = 4;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user