Docs Goabase

HelperFormat extends HelperJson
in package

Table of Contents

Methods

calcZipSize()  : int
checkAtts()  : array<string|int, mixed>
setzt (int) auf _id
cleanComment()  : array<string|int, mixed>|string
Helper preg_replace Returns text/code without comments
cleanNum()  : mixed
Cuts zeros at the end
cleanWWW()  : string
Removes https://, https://www., http://, http://www., www.
dateTimeFormat()  : string
translates iso-timestamp into other format YYYY-MM-DD hh:mm:ss uralte funktion
decodeToArray()  : mixed
json to array
doIntRow()  : array<string|int, mixed>
encodeToIso()  : string
encodeToJson()  : string
Returns the json representation of a value
encodeToUtf8()  : string
fetchGeoError()  : string
filledOnly()  : array<string|int, mixed>
filterAllowedCsvValues()  : string
Values können einfach oder mehrfach kommagetrennt sein. Die gültigen müssen am Ende der Liste stehen.
getAllowedAtt()  : array<string|int, mixed>
getApostroph()  : string
Setzt Apostroph
getCleanIntVal()  : int|float
getFileToSeo()  : string
getFontOfSmiley()  : string
converts ascii-smileys to
getPartyTodayHint()  : string
Get "today" or "tomorrow" text for a party date
getRandom()  : int
hasAllKeys()  : bool
Helper function to check if all keys exist in the array
htmlSan()  : string
humanFilesize()  : string
isIsoDate()  : bool
Validates the date format YYYY-MM-DD
makeEntityCrapRepair()  : array<string|int, mixed>|string|array<string|int, string>|null
Repairs Entity Crap
numberFormat()  : float|string
Formats a number/price in the language
removeTitleRe()  : string
Removes the "Re: " from the forum title
replaceName()  : string
returnAlphaNum()  : int|string|null
Helper preg_replace('/[^0-9A-z]/','',$var)
returnAtoZ()  : string
returnDigit()  : int
Helper preg_replace('/\D/','',$var)
returnPUID()  : string
singlePartyLng()  : string
userName()  : string

Methods

calcZipSize()

public static calcZipSize(int $nSizeChars) : int
Parameters
$nSizeChars : int
Return values
int

checkAtts()

setzt (int) auf _id

public static checkAtts([array<string|int, mixed> $saAtt = [] ]) : array<string|int, mixed>
Parameters
$saAtt : array<string|int, mixed> = []
Return values
array<string|int, mixed>

cleanComment()

Helper preg_replace Returns text/code without comments

public static cleanComment(array<string|int, mixed>|string $var) : array<string|int, mixed>|string
Parameters
$var : array<string|int, mixed>|string
Return values
array<string|int, mixed>|string

cleanNum()

Cuts zeros at the end

public static cleanNum(mixed $num) : mixed
Parameters
$num : mixed

cleanWWW()

Removes https://, https://www., http://, http://www., www.

public static cleanWWW(string $val) : string
Parameters
$val : string
Return values
string

dateTimeFormat()

translates iso-timestamp into other format YYYY-MM-DD hh:mm:ss uralte funktion

public static dateTimeFormat(string $dateTime[, string $dateFormat = '' ]) : string
Parameters
$dateTime : string

timestamp ISO

$dateFormat : string = ''
Return values
string

decodeToArray()

json to array

public static decodeToArray(string $json) : mixed
Parameters
$json : string

doIntRow()

public static doIntRow([array<string|int, mixed> $saRow = [] ]) : array<string|int, mixed>
Parameters
$saRow : array<string|int, mixed> = []
Return values
array<string|int, mixed>

encodeToIso()

public static encodeToIso(string $string) : string
Parameters
$string : string
Return values
string

encodeToJson()

Returns the json representation of a value

public static encodeToJson(array<string|int, array<string|int, mixed>|int|mixed|string> $val) : string
Parameters
$val : array<string|int, array<string|int, mixed>|int|mixed|string>
Tags
psalm-param

array<array|int|mixed|string> $val

Return values
string

encodeToUtf8()

public static encodeToUtf8(string $string) : string
Parameters
$string : string
Return values
string

fetchGeoError()

public static fetchGeoError() : string
Return values
string

filledOnly()

public static filledOnly([array<string|int, mixed> $array = [] ]) : array<string|int, mixed>
Parameters
$array : array<string|int, mixed> = []
Return values
array<string|int, mixed>

filterAllowedCsvValues()

Values können einfach oder mehrfach kommagetrennt sein. Die gültigen müssen am Ende der Liste stehen.

public static filterAllowedCsvValues(string $value, string $allowedCsv) : string
Parameters
$value : string
$allowedCsv : string
Return values
string

getAllowedAtt()

public static getAllowedAtt([array<string|int, mixed> $saAtt = [] ][, string $type = 'party' ]) : array<string|int, mixed>
Parameters
$saAtt : array<string|int, mixed> = []
$type : string = 'party'
Return values
array<string|int, mixed>

getApostroph()

Setzt Apostroph

public static getApostroph(string $strName) : string
Parameters
$strName : string
Return values
string

getCleanIntVal()

public static getCleanIntVal(mixed $var) : int|float
Parameters
$var : mixed
Return values
int|float

getFileToSeo()

public static getFileToSeo([string $fileName = THIS_FILE ]) : string
Parameters
$fileName : string = THIS_FILE
Return values
string

getFontOfSmiley()

converts ascii-smileys to

public static getFontOfSmiley(string $strContent[, bool $bFull = false ]) : string
Parameters
$strContent : string
$bFull : bool = false
Return values
string
  • with emoticons

getPartyTodayHint()

Get "today" or "tomorrow" text for a party date

public static getPartyTodayHint(array<string|int, mixed> $saParty) : string
Parameters
$saParty : array<string|int, mixed>
Return values
string

getRandom()

public static getRandom(int $nMin, int $nMax) : int
Parameters
$nMin : int
$nMax : int
Return values
int

hasAllKeys()

Helper function to check if all keys exist in the array

public static hasAllKeys(array<string|int, mixed> $array, array<string|int, mixed> $keys) : bool
Parameters
$array : array<string|int, mixed>
$keys : array<string|int, mixed>
Return values
bool

htmlSan()

public static htmlSan(mixed $var) : string
Parameters
$var : mixed
Return values
string

humanFilesize()

public static humanFilesize(string $bytes[, int $decimals = 2 ]) : string
Parameters
$bytes : string
$decimals : int = 2
Return values
string

isIsoDate()

Validates the date format YYYY-MM-DD

public static isIsoDate(string $date) : bool
Parameters
$date : string
Return values
bool

makeEntityCrapRepair()

Repairs Entity Crap

public static makeEntityCrapRepair(array<string|int, mixed>|string $strTerm) : array<string|int, mixed>|string|array<string|int, string>|null
Parameters
$strTerm : array<string|int, mixed>|string

"Fovič";

Return values
array<string|int, mixed>|string|array<string|int, string>|null

UTF-8

numberFormat()

Formats a number/price in the language

public static numberFormat(float|string|int $number[, int $decimals = 2 ]) : float|string
Parameters
$number : float|string|int
$decimals : int = 2
Return values
float|string

removeTitleRe()

Removes the "Re: " from the forum title

public static removeTitleRe([string $strTitle = '' ]) : string
Parameters
$strTitle : string = ''
Return values
string

replaceName()

public static replaceName([string $strName = '' ][, string $strContent = '' ]) : string
Parameters
$strName : string = ''
$strContent : string = ''
Return values
string

returnAlphaNum()

Helper preg_replace('/[^0-9A-z]/','',$var)

public static returnAlphaNum([mixed $var = '' ]) : int|string|null
Parameters
$var : mixed = ''
Return values
int|string|null

returnAtoZ()

public static returnAtoZ(string $var) : string
Parameters
$var : string
Return values
string

returnDigit()

Helper preg_replace('/\D/','',$var)

public static returnDigit(mixed $var) : int
Parameters
$var : mixed
Return values
int

returnPUID()

public static returnPUID(int|string $var) : string
Parameters
$var : int|string
Tags
psalm-param

array-key $var

Return values
string

singlePartyLng()

public static singlePartyLng(int $nParties) : string
Parameters
$nParties : int
Return values
string

userName()

public static userName(string|null $strUserPublicName, string $strTopic) : string
Parameters
$strUserPublicName : string|null
$strTopic : string
Return values
string

        
On this page

Search results