-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace Gsales\Helper; | ||
|
||
class CamelCaps | ||
{ | ||
public static function camelCaps($str) | ||
{ | ||
$str = str_replace('_',' ', $str); | ||
$str = ucwords($str); | ||
$str = str_replace(' ','', $str); | ||
return $str; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace Gsales\Helper; | ||
|
||
class DateDe2EnWithoutDateCheck | ||
{ | ||
public static function dateDe2EnWithoutDateCheck($string) | ||
{ | ||
if (null == $string) return $string; | ||
if (false != strstr($string,'-')) return $string; | ||
//12.11.2006 -> 2006-11-12 | ||
$teile = explode('.',$string); | ||
return $teile[2].'-'.$teile[1].'-'.$teile[0]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace Gsales\Helper; | ||
|
||
class NumberDe2En | ||
{ | ||
public static function numberDe2En($string) | ||
{ | ||
$string = str_replace('.','',$string); | ||
return str_replace(',','.',$string); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace Gsales\Helper; | ||
|
||
class RemoveSpaces | ||
{ | ||
public static function removeSpaces($value) | ||
{ | ||
if (null == $value) return $value; | ||
return str_replace(' ','',$value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Gsales\Helper; | ||
|
||
class UppercaseAndRemoveUmlaut | ||
{ | ||
public static function uppercaseAndRemoveUmlaut($value) | ||
{ | ||
if (null == $value) return $value; | ||
$value = strtoupper($value); | ||
$value = str_replace('&', 'U', $value); | ||
$search = array('Ä', 'Ö', 'Ü', 'ß','ä', 'ö', 'ü', 'ß'); | ||
$replace = array('AE', 'OE', 'UE', 'SS','AE', 'OE', 'UE', 'SS'); | ||
return str_replace($search, $replace, $value); | ||
} | ||
} |