Source for file Enviroment.php
Documentation is available at Enviroment.php
* "THE BEER-WARE LICENSE" (Revision 42):
* "Sven Strittmatter" <ausserirdisch@sven-space.de> wrote this file.
* As long as you retain this notice you can do whatever you want with
* this stuff. If we meet some day, and you think this stuff is worth it,
* you can buy me a beer in return.
* @package Console_Application
* @copyright Copyright (c) 2009 Sven Strittmatter
* Template method class for CLI commands.
* @see HelloWorldApplication for an example implementation.
* @package Console_Enviroment
* @copyright Copyright (c) 2009 Sven Strittmatter
const OS_WINDOWS = 'win';
const OS_MACOS = 'Darwin';
const OS_LINIX = 'linux';
* @link http://de.php.net/manual/en/function.php-sapi-name.php
* Returns if the php enviromt is of an specific os type.
* @param string $osType One of the OS_* constants
public static function isOs($osType) {
return PHP_OS === $osType;
* Returns if the php enviroment os is Winows
// return self::isOs(self::OS_WINDOWS);
* Returns if the php enviroment os is Linux
// return self::isOs(self::OS_Linux);
* Returns if the php enviroment os is Mac Os
return self::isOs(self::OS_MACOS);
|