Various helper functions.
\Hubleto\Framework\Helper
Properties
☍ loadUrlError
public static $loadUrlError
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
ƒ 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 |
|