escapeSQLString()
escape apostrophe in SQL
escapeSQLString(string $str) : string
Parameters
- $str : string
escape apostrophe in SQL
escapeSQLString(string $str) : string
Safe key name from string
safe_key(string $key) : string
translate string with format main.key
t() : string
create object through DI Container
c(string $class[, array<string|int, mixed> $params = [] ]) : object
Create model class instance using a dependency injection container.
m(string $class) : BaseModel
Pagination with elipsis.
pagination(int $c, int $m[, int $d = 5 ]) : array<string|int, mixed>
current page
total pages
radius
Create .ini file string from array (compatible with F3 config).
create_ini(array<string|int, mixed> $vals) : string
Set CSRF into session and return its value.
csrf() : void
Retrieves data from cache if available, otherwise processes and caches it for a specified duration.
cache(string $key[, int $duration = 84600 ][, callable|null $process = null ]) : mixed
Membuat daftar field alias untuk rakitval.
al(string $section, string|array<string|int, mixed> $fields) : array<string|int, mixed>
Build tree from flat array
buildTree(array<string|int, mixed> &$elements[, int $parentId = 0 ]) : void
Is user logged in for this app id?
isLoggedIn() : bool
Check user permissions based on their group, section, and path, with additional checks for superadmin privileges.
rbac_permission(mixed $user, mixed $group, mixed $permissions[, mixed $section = "" ][, mixed $rpath = "" ]) : bool
The function rbac_permission returns a boolean value.
Checks if a user has permission to access a specific section or resource path based on their session credentials.
rbac_session_permission([mixed $section = "" ][, mixed $rpath = "" ]) : bool
rbac_path_permission(mixed $path) : mixed
Generates a version 4 UUID in PHP using random bytes.
guidv4() : string
a 36-character UUID string in the format xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx, where each x is a hexadecimal digit and y is a hexadecimal digit with the most significant bits set to 10.