moved Utility classes into own folder+namespace

This commit is contained in:
Steffen Schröder
2014-05-13 14:32:30 +02:00
parent 2fd501f2e8
commit 00eb49414a
30 changed files with 39 additions and 37 deletions

View File

@ -1,35 +0,0 @@
<?php
namespace ManiaControl;
/**
* 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 with the given Name
*
* @param string $paramName
* @return mixed
*/
public static function getParameter($paramName) {
global $argv;
$paramName = (string)$paramName;
foreach ($argv as $arg) {
$parts = explode('=', $arg, 2);
if (count($parts) < 2) {
continue;
}
if ($parts[0] !== $paramName) {
continue;
}
return $parts[1];
}
return null;
}
}