FacturaScripts

Tools
in package

Table of Contents

ASCII  = ['Š' => 'S', 'š' => 's', 'Đ' => 'Dj', 'đ' => 'dj', 'Ž' => 'Z', 'ž' => 'z', 'Č' => 'C', 'č' => 'c', 'Ć' => 'C', 'ć' => 'c', 'À' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ã' => 'A', 'Ä' => 'A', 'Å' => 'A', 'Æ' => 'A', 'Ç' => 'C', 'È' => 'E', 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Ì' => 'I', 'Í' => 'I', 'Î' => 'I', 'Ï' => 'I', 'Ñ' => 'N', 'Ò' => 'O', 'Ó' => 'O', 'Ô' => 'O', 'Õ' => 'O', 'Ö' => 'O', 'Ø' => 'O', 'Ù' => 'U', 'Ú' => 'U', 'Û' => 'U', 'Ü' => 'U', 'Ý' => 'Y', 'Þ' => 'B', 'ß' => 'Ss', 'à' => 'a', 'á' => 'a', 'â' => 'a', 'ã' => 'a', 'ä' => 'a', 'å' => 'a', 'æ' => 'a', 'ç' => 'c', 'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e', 'ì' => 'i', 'í' => 'i', 'î' => 'i', 'ï' => 'i', 'ð' => 'o', 'ñ' => 'n', 'ò' => 'o', 'ó' => 'o', 'ô' => 'o', 'õ' => 'o', 'ö' => 'o', 'ø' => 'o', 'ù' => 'u', 'ú' => 'u', 'û' => 'u', 'ý' => 'y', 'þ' => 'b', 'ÿ' => 'y', 'Ŕ' => 'R', 'ŕ' => 'r']
DATE_STYLE  = 'd-m-Y'
DATETIME_STYLE  = 'd-m-Y H:i:s'
HOUR_STYLE  = 'H:i:s'
HTML_CHARS  = ['<', '>', '"', "'"]
HTML_REPLACEMENTS  = ['&lt;', '&gt;', '&quot;', '&#39;']
$settings  : array<string|int, mixed>
ascii()  : string
bytes()  : string
config()  : mixed
date()  : string
dateTime()  : string
fixHtml()  : string|null
folder()  : string
folderCheckOrCreate()  : bool
folderCopy()  : bool
folderDelete()  : bool
folderScan()  : array<string|int, mixed>
hour()  : string
lang()  : Translator
log()  : MiniLog
money()  : string
noHtml()  : string|null
number()  : string
password()  : string
randomString()  : string
settings()  : mixed
settingsSave()  : bool
settingsSet()  : void
slug()  : string
textBreak()  : string
timeToDate()  : string
timeToDateTime()  : string

Constants

ASCII

public mixed ASCII = ['Š' => 'S', 'š' => 's', 'Đ' => 'Dj', 'đ' => 'dj', 'Ž' => 'Z', 'ž' => 'z', 'Č' => 'C', 'č' => 'c', 'Ć' => 'C', 'ć' => 'c', 'À' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ã' => 'A', 'Ä' => 'A', 'Å' => 'A', 'Æ' => 'A', 'Ç' => 'C', 'È' => 'E', 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Ì' => 'I', 'Í' => 'I', 'Î' => 'I', 'Ï' => 'I', 'Ñ' => 'N', 'Ò' => 'O', 'Ó' => 'O', 'Ô' => 'O', 'Õ' => 'O', 'Ö' => 'O', 'Ø' => 'O', 'Ù' => 'U', 'Ú' => 'U', 'Û' => 'U', 'Ü' => 'U', 'Ý' => 'Y', 'Þ' => 'B', 'ß' => 'Ss', 'à' => 'a', 'á' => 'a', 'â' => 'a', 'ã' => 'a', 'ä' => 'a', 'å' => 'a', 'æ' => 'a', 'ç' => 'c', 'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e', 'ì' => 'i', 'í' => 'i', 'î' => 'i', 'ï' => 'i', 'ð' => 'o', 'ñ' => 'n', 'ò' => 'o', 'ó' => 'o', 'ô' => 'o', 'õ' => 'o', 'ö' => 'o', 'ø' => 'o', 'ù' => 'u', 'ú' => 'u', 'û' => 'u', 'ý' => 'y', 'þ' => 'b', 'ÿ' => 'y', 'Ŕ' => 'R', 'ŕ' => 'r']

DATE_STYLE

public mixed DATE_STYLE = 'd-m-Y'

DATETIME_STYLE

public mixed DATETIME_STYLE = 'd-m-Y H:i:s'

HOUR_STYLE

public mixed HOUR_STYLE = 'H:i:s'

HTML_CHARS

public mixed HTML_CHARS = ['<', '>', '"', "'"]

HTML_REPLACEMENTS

public mixed HTML_REPLACEMENTS = ['&lt;', '&gt;', '&quot;', '&#39;']

Properties

$settings

private static array<string|int, mixed> $settings = []

Methods

ascii()

public static ascii(string $text) : string
Parameters
$text : string
Return values
string

bytes()

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

config()

public static config(string $key[, mixed $default = null ]) : mixed
Parameters
$key : string
$default : mixed = null
Return values
mixed

date()

public static date([string|null $date = null ]) : string
Parameters
$date : string|null = null
Return values
string

dateTime()

public static dateTime([string|null $date = null ]) : string
Parameters
$date : string|null = null
Return values
string

fixHtml()

public static fixHtml([string|null $text = null ]) : string|null
Parameters
$text : string|null = null
Return values
string|null

folder()

public static folder(mixed ...$folders) : string
Parameters
$folders : mixed
Return values
string

folderCheckOrCreate()

public static folderCheckOrCreate(string $folder) : bool
Parameters
$folder : string
Return values
bool

folderCopy()

public static folderCopy(string $src, string $dst) : bool
Parameters
$src : string
$dst : string
Return values
bool

folderDelete()

public static folderDelete(string $folder) : bool
Parameters
$folder : string
Return values
bool

folderScan()

public static folderScan(string $folder[, bool $recursive = false ][, array<string|int, mixed> $exclude = ['.DS_Store', '.well-known'] ]) : array<string|int, mixed>
Parameters
$folder : string
$recursive : bool = false
$exclude : array<string|int, mixed> = ['.DS_Store', '.well-known']
Return values
array<string|int, mixed>

hour()

public static hour([string|null $date = null ]) : string
Parameters
$date : string|null = null
Return values
string

log()

public static log([string $channel = '' ]) : MiniLog
Parameters
$channel : string = ''
Return values
MiniLog

money()

public static money(float $number[, string $coddivisa = '' ]) : string
Parameters
$number : float
$coddivisa : string = ''
Return values
string

noHtml()

public static noHtml(string|null $text) : string|null
Parameters
$text : string|null
Return values
string|null

number()

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

password()

public static password([int $length = 10 ]) : string
Parameters
$length : int = 10
Return values
string

randomString()

public static randomString([int $length = 10 ]) : string
Parameters
$length : int = 10
Return values
string

settings()

public static settings(string $group, string $key[, mixed $default = null ]) : mixed
Parameters
$group : string
$key : string
$default : mixed = null
Return values
mixed

settingsSave()

public static settingsSave() : bool
Return values
bool

settingsSet()

public static settingsSet(string $group, string $key, mixed $value) : void
Parameters
$group : string
$key : string
$value : mixed
Return values
void

slug()

public static slug(string $text[, string $separator = '-' ], int $maxLength) : string
Parameters
$text : string
$separator : string = '-'
$maxLength : int
Return values
string

textBreak()

public static textBreak(string $text[, int $length = 50 ][, string $break = '...' ]) : string
Parameters
$text : string
$length : int = 50
$break : string = '...'
Return values
string

timeToDate()

public static timeToDate(int $time) : string
Parameters
$time : int
Return values
string

timeToDateTime()

public static timeToDateTime(int $time) : string
Parameters
$time : int
Return values
string

Search results