removed 'application' folder to have everything in the root directory

This commit is contained in:
Steffen Schröder
2014-09-29 18:20:09 +02:00
parent 1569fd5488
commit 9642433363
284 changed files with 4 additions and 50 deletions

View File

@ -0,0 +1,45 @@
<?php
namespace ManiaControl\Utils;
/**
* Command Line Helper Class
*
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class CommandLineHelper {
/**
* Get the command line parameter value with the given name
*
* @param string $paramName
* @return string
*/
public static function getParameter($paramName) {
$paramName = (string)$paramName;
$params = self::getAllParameters();
foreach ($params as $param) {
$parts = explode('=', $param, 2);
if (count($parts) < 2) {
continue;
}
if ($parts[0] !== $paramName) {
continue;
}
return $parts[1];
}
return null;
}
/**
* Get all command line parameters
*
* @return array
*/
public static function getAllParameters() {
global $argv;
return (array)$argv;
}
}