diff --git a/System/OperatingSystem.php b/System/OperatingSystem.php new file mode 100644 index 000000000..ffdae2932 --- /dev/null +++ b/System/OperatingSystem.php @@ -0,0 +1,32 @@ + + * @author Dennis Eichhorn + * @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; + } + } +} \ No newline at end of file diff --git a/System/SystemType.php b/System/SystemType.php new file mode 100644 index 000000000..ecdc4586a --- /dev/null +++ b/System/SystemType.php @@ -0,0 +1,39 @@ + + * @author Dennis Eichhorn + * @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 + * @author Dennis Eichhorn + * @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; +} \ No newline at end of file