Config
in package
Uses
Content, SQL
Table of Contents
Constants
- PREF_KEY = "app_pref"
Properties
- $default : array<string|int, mixed>
Methods
- __construct() : mixed
- FSQL() : array<string|int, mixed>
- Flat SQL array result. The order of the field is important.
- FSQL1() : string
- Single value SQL result.
- FSQLC() : array<string|int, mixed>
- Flat SQL array result Column.
- FSQLR() : array<string|int, mixed>
- Flat SQL array result Row.
- load_pref() : array<string|int, mixed>
- read() : mixed
- SQL() : mixed
- Execute SQL, if select operation return result in associative array.
- SQLBI() : void
- Bulk Insert.
- SQLBU() : void
- Bulk Update, only single pk is allowed.
- SQLR() : array<string|int, mixed>
- Execute SQL, return first row from result.
- store_pref() : bool
- write() : mixed
Constants
PREF_KEY
public
mixed
PREF_KEY
= "app_pref"
Properties
$default
private
array<string|int, mixed>
$default
Methods
__construct()
public
__construct() : mixed
FSQL()
Flat SQL array result. The order of the field is important.
public
FSQL() : array<string|int, mixed>
Return values
array<string|int, mixed>FSQL1()
Single value SQL result.
public
FSQL1() : string
Return values
string —value of the query with 1 row, 1 column (e.g. SELECT COUNT(1))
FSQLC()
Flat SQL array result Column.
public
FSQLC() : array<string|int, mixed>
Return values
array<string|int, mixed>FSQLR()
Flat SQL array result Row.
public
FSQLR() : array<string|int, mixed>
Return values
array<string|int, mixed> —result that only needed only the first record
load_pref()
public
load_pref() : array<string|int, mixed>
Return values
array<string|int, mixed>read()
public
read(mixed $key[, mixed $ttl = 3600 ]) : mixed
Parameters
- $key : mixed
- $ttl : mixed = 3600
SQL()
Execute SQL, if select operation return result in associative array.
public
SQL() : mixed
Return values
mixed —result in associative array
SQLBI()
Bulk Insert.
public
SQLBI(string $sql, array<string|int, mixed> $values[, int $chunk_size = 100 ]) : void
Parameters
- $sql : string
- $values : array<string|int, mixed>
- $chunk_size : int = 100
-
(optional)
SQLBU()
Bulk Update, only single pk is allowed.
public
SQLBU(string $sql, string $pk, array<string|int, mixed> $values[, int $chunk_size = 100 ]) : void
Parameters
- $sql : string
- $pk : string
- $values : array<string|int, mixed>
- $chunk_size : int = 100
-
(optional)
SQLR()
Execute SQL, return first row from result.
public
SQLR() : array<string|int, mixed>
Return values
array<string|int, mixed>store_pref()
public
store_pref(array<string|int, mixed> $rules) : bool
Parameters
- $rules : array<string|int, mixed>
Return values
boolwrite()
public
write(mixed $key, mixed $value) : mixed
Parameters
- $key : mixed
- $value : mixed