tools
in package
Some generic methods.
Tags
Table of Contents
Methods
- displayFileSize() : string
- Human readable file size.
- stringSimplify() : string
- Replace accentuated letters and delete special characters.
- unaccent() : string
- Replace accentuated letters.
Methods
displayFileSize()
Human readable file size.
public
displayFileSize(string $file) : string
Replace octets with appropriate value. Ex : 1024 -> 1 Mo.
Parameters
- $file : string
-
File from which to display the size
Return values
string —$filesize Formated file size
stringSimplify()
Replace accentuated letters and delete special characters.
public
stringSimplify(string $string, bool $accent, bool $special, bool $underscore, bool $capital) : string
Parameters
- $string : string
-
String passed
- $accent : bool
-
Replace the accents ?
- $special : bool
-
Replace special chars with underscores ?
- $underscore : bool
-
Delete underscores ?
- $capital : bool
-
Replace capital letters ?
Return values
stringunaccent()
Replace accentuated letters.
public
unaccent(string $string) : string
Parameters
- $string : string
-
String passed