Documentation

tools

FanPress CM internal tools class

Table of Contents

calcSize() Erzeugt für Wert in $value einen String mit passender Einheit und Anzahl Dezimalstellen von Byte (B) bis Terrabyte/Tebibyte (TB/TiB) string
getControllerLink() Create controller link string
getFullControllerLink() Create controller link string
calcPagination() Berechnet Werte für Seitennavigation array
getPageOffset() Berechnet Limit anhand von Seite und Limit pro Seite int
getNavigationActiveCheckStr() String zum Setzen des aktuell aktiven Modules in Navigation string
escapeFileName() Escapes filename string
getHash() Create Hash of $data with @see security::defaultHashAlgo string
validateDateString() Validates date string bool
strReplaceArray() Array wrapper for str_replace array

Methods

calcSize()

Erzeugt für Wert in $value einen String mit passender Einheit und Anzahl Dezimalstellen von Byte (B) bis Terrabyte/Tebibyte (TB/TiB)

public static calcSize( $value : number [, $decimals : int = 2 ] [, $delimDec : string = ',' ] [, $delimTousands : string = '.' ] ) : string
Parameters
$value : number

ein numerischer Wert

$decimals : int = 2

Anzahl Dezimalstellen, Default = 2

$delimDec : string = ','

Dezimal-Trennzeichen

$delimTousands : string = '.'

Tausender-Trennzeichen

Tags
since
Return values
string

getControllerLink()

Create controller link

public static getControllerLink( [ $controller : string = '' ] [, $params : array = [] ] ) : string
Parameters
$controller : string = ''
$params : array = []
Tags
since
Return values
string

getFullControllerLink()

Create controller link

public static getFullControllerLink( [ $controller : string = '' ] [, $params : array = [] ] ) : string
Parameters
$controller : string = ''
$params : array = []
Tags
since
Return values
string

calcPagination()

Berechnet Werte für Seitennavigation

public static calcPagination( $pageLimit : int , $currentPage : int , $maxItemCount : int , $currentItemCount : int ) : array
Parameters
$pageLimit : int
$currentPage : int
$maxItemCount : int
$currentItemCount : int
Tags
since
Return values
array

getPageOffset()

Berechnet Limit anhand von Seite und Limit pro Seite

public static getPageOffset( $page : int , $pageLimit : int ) : int
Parameters
$page : int
$pageLimit : int
Tags
since
Return values
int

getNavigationActiveCheckStr()

String zum Setzen des aktuell aktiven Modules in Navigation

public static getNavigationActiveCheckStr( ) : string
Tags
since
Return values
string

escapeFileName()

Escapes filename

public static escapeFileName( $filename : string ) : string
Parameters
$filename : string
Return values
string

getHash()

Create Hash of $data with @see security::defaultHashAlgo

public static getHash( $data : string ) : string
Parameters
$data : string
Return values
string

validateDateString()

Validates date string

public static validateDateString( $str : string ) : bool
Parameters
$str : string
Tags
since
Return values
bool

strReplaceArray()

Array wrapper for str_replace

public static strReplaceArray( $subject : string , $replacement : array [, &$count : int = NULL ] ) : array
Parameters
$subject : string
$replacement : array
$count : int = NULL
Tags
see
since
Return values
array

Search results