Various helper functions.
\Hubleto\Framework\Helper
Properties
loadUrlError
public static $loadUrlError
- This property is static.
Methods
__construct
public __construct(): mixed
deleteTags
Function serves as a delete funtion for the Tag Input
public deleteTags(array $recordTagsIds, mixed $mCrossTag, string $lookupColumnName, int $lookupId): void
Parameters:
Parameter | Type | Description |
---|---|---|
$recordTagsIds |
array | |
$mCrossTag |
mixed | |
$lookupColumnName |
string | Name of the lookup column in the cross tag model |
$lookupId |
int | The id of the lookup |
minifyHtml
Minifies HTML
public static minifyHtml(string $html): string
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$html |
string | Input HTML |
Return Value:
Minified HTML
loadUrl
Load content of remote URL using PHP's CURL library.
public static loadUrl(string $url, array $post = []): string
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$url |
string | URL to be loaded |
$post |
array | Array of POST values to be posted to the request |
Return Value:
Loaded content of remote URL
rmspecialchars
Removes special characters from string
public static rmspecialchars(string $string): string
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$string |
string | Original string |
Return Value:
String with removed special characters
rmdiacritic
Removes punctuation characters from string
public static rmdiacritic(string $string): string
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$string |
string | Original string |
Return Value:
String with removed punctuation characters
str2url
Convert string with to URL-compatible string
public static str2url(string $string, bool $replaceSlashes = TRUE): string
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$string |
string | Original string |
$replaceSlashes |
bool | If TRUE, slashes are replaced with hyphenation |
Return Value:
URL-compatible string
str2uid
public static str2uid(mixed $string, mixed $replaceSlashes = TRUE): mixed
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$string |
mixed | |
$replaceSlashes |
mixed |
generateUuidV4
public static generateUuidV4(): string
- This method is static.
randomPassword
Generates random password
public static randomPassword(): string
- This method is static. Return Value:
Generated random password
scanDirRecursively
public static scanDirRecursively(mixed $dir): array
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$dir |
mixed |
capitalizeFirstLetter
public static capitalizeFirstLetter(string $s): mixed
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$s |
string |
kebabToCamel
public static kebabToCamel(string $s): mixed
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$s |
string |
kebabToPascal
public static kebabToPascal(string $s): mixed
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$s |
string |
camelToKebab
public static camelToKebab(string $s): mixed
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$s |
string |
pascalToKebab
public static pascalToKebab(string $s): mixed
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$s |
string |
pluck
public static pluck(string $key, array $data): array
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$key |
string | |
$data |
array |
keyBy
public static keyBy(string $key, array $data): array
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$key |
string | |
$data |
array |
groupBy
public static groupBy(string $key, array $data): array
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$key |
string | |
$data |
array |
encrypt
public static encrypt(string $value, string $seed = '', mixed $force = false): mixed
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$value |
string | |
$seed |
string | |
$force |
mixed |
decrypt
public static decrypt(string $value, string $seed = '', mixed $force = false): mixed
- This method is static. Parameters:
Parameter | Type | Description |
---|---|---|
$value |
string | |
$seed |
string | |
$force |
mixed |