public function unit_to_constant($name)
    {
        $camel = '';
        $name = str_replace(':', '', $name);
        foreach (explode('_', $name) as $str) {
            $camel .= ucfirst($str);
        }
        return 'PHPWarrior\Units\\' . $camel;
    }
public function unit_to_constant($name)
    {
        $camel = '';
        $name = str_replace(':', '', $name);
        foreach (explode('_', $name) as $str) {
            $camel .= ucfirst($str);
        }
        return 'PHPWarrior\Units\\' . $camel;
    }
public function unit_to_constant ( $ name ) { $ camel = '' ; $ name = str_replace ( ':' , '' , $ name ) ; foreach ( explode ( '_' , $ name ) as $ str ) { $ camel .= ucfirst ( $ str ) ; } return 'PHPWarrior\Units\\' . $ camel ; }
Unit to constant

@param $name

@return string
Unit to constant