PHP Class Crunz\Utils

Show file Open project: lavary/crunz Class Usage Examples

Public Methods

Method Description
arrayOnly ( array $array, array | string $keys ) : array Get a subset of the items from the given array From Illuminate/support helper functions
generatePath ( string $relative_path ) : string return absolute path for relative path
getBaseDir ( ) : string Return project's root directory
getRoot ( string $autoloader ) : string Get the root directory by the autoloader file
setBaseDir ( $base_dir ) : string Set project's root directory
splitCamel ( string $text ) : string Split camel case string
wordToNumber ( string $text ) : string Converts words to numbers

Method Details

arrayOnly() public static method

Get a subset of the items from the given array From Illuminate/support helper functions
public static arrayOnly ( array $array, array | string $keys ) : array
$array array
$keys array | string
return array

generatePath() public static method

return absolute path for relative path
public static generatePath ( string $relative_path ) : string
$relative_path string
return string

getBaseDir() public static method

Return project's root directory
public static getBaseDir ( ) : string
return string

getRoot() public static method

Get the root directory by the autoloader file
public static getRoot ( string $autoloader ) : string
$autoloader string
return string

setBaseDir() public static method

Set project's root directory
public static setBaseDir ( $base_dir ) : string
return string

splitCamel() public static method

Split camel case string
public static splitCamel ( string $text ) : string
$text string
return string

wordToNumber() public static method

Converts words to numbers
public static wordToNumber ( string $text ) : string
$text string
return string