v0

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
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
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
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
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
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
Parameter Type Description
$string mixed
$replaceSlashes mixed

generateUuidV4

public static generateUuidV4(): string

randomPassword

Generates random password

public static randomPassword(): string

Generated random password

scanDirRecursively

public static scanDirRecursively(mixed $dir): array
Parameter Type Description
$dir mixed

capitalizeFirstLetter

public static capitalizeFirstLetter(string $s): mixed
Parameter Type Description
$s string

kebabToCamel

public static kebabToCamel(string $s): mixed
Parameter Type Description
$s string

kebabToPascal

public static kebabToPascal(string $s): mixed
Parameter Type Description
$s string

camelToKebab

public static camelToKebab(string $s): mixed
Parameter Type Description
$s string

pascalToKebab

public static pascalToKebab(string $s): mixed
Parameter Type Description
$s string

pluck

public static pluck(string $key, array $data): array
Parameter Type Description
$key string
$data array

keyBy

public static keyBy(string $key, array $data): array
Parameter Type Description
$key string
$data array

groupBy

public static groupBy(string $key, array $data): array
Parameter Type Description
$key string
$data array

encrypt

public static encrypt(string $value, string $seed = '', mixed $force = false): mixed
Parameter Type Description
$value string
$seed string
$force mixed

decrypt

public static decrypt(string $value, string $seed = '', mixed $force = false): mixed
Parameter Type Description
$value string
$seed string
$force mixed
www.hubleto.com | Found a bug or missing something? Report an issue via GitHub.