Class Tool
Core tools: - translating cases (with folders support): - dashed-case to PascalCase - PascalCase to dashed-case - unserscore_case to PascalCase - PascalCase to unserscore_case - JSON safe encode/decode
public static
string
|
#
GetDashedFromPascalCase( string $pascalCase = '' )
Convert all string 'from' => 'to': - 'MyCutomValue' => 'my-custom-value' - 'MyCutom/Value/InsideFolder' => 'my-custom/value/inside-folder' |
public static
string
|
#
GetPascalCaseFromDashed( string $dashed = '' )
Convert all string 'from' => 'to': - 'my-custom-value' => 'MyCutomValue' - 'my-custom/value/inside-folder'=> 'MyCutom/Value/InsideFolder' |
public static
string
|
#
GetUnderscoredFromPascalCase( string $pascalCase = '' )
Convert all string 'from' => 'to': - 'MyCutomValue' => 'my_custom_value' - 'MyCutom/Value/InsideFolder' => 'my_custom/value/inside_folder' |
public static
string
|
#
GetPascalCaseFromUnderscored( string $underscored = '' )
Convert all string 'from' => 'to': - 'my_custom_value' => 'MyCutomValue' - 'my_custom/value/inside_folder'=> 'MyCutom/Value/InsideFolder' |
public static
string
|
|
public static
object
|
#
DecodeJson( string & $jsonStr )
Safely decode json string into php stdClass/array. Result has always keys: - 'success' - decoding boolean success - 'data' - decoded json data as stdClass/array - 'errorData'- array with possible decoding error message and error code |