Binding extends BaseTable
Table of Contents
Constants
- BINDING_TYPE_BLOCK = 'B'
- Block binding type.
Properties
- $internalClass : string
- Internal class.
Methods
- add() : AddResult
- Create new record and return it new id.
- bindingBlock() : void
- Binds block with chat.
- callback() : void
- Register calllback for internal table.
- clearCache() : void
- Clears all cache by chat id.
- delete() : Result
- Delete record.
- getList() : Result
- Get records of table.
- getMap() : array<string|int, mixed>
- Get Map of table.
- unbindingBlock() : void
- Unbinds block from chat.
- update() : Result
- Update record.
Constants
BINDING_TYPE_BLOCK
Block binding type.
public
mixed
BINDING_TYPE_BLOCK
= 'B'
Properties
$internalClass
Internal class.
public
static string
$internalClass
= 'ChatBindingTable'
Methods
add()
Create new record and return it new id.
public
static add(array<string|int, mixed> $fields) : AddResult
Parameters
- $fields : array<string|int, mixed>
-
Fields array.
Return values
AddResultbindingBlock()
Binds block with chat.
public
static bindingBlock(int $chatId, int $blockId) : void
Parameters
- $chatId : int
-
Internal chat id.
- $blockId : int
-
Block id.
callback()
Register calllback for internal table.
public
static callback(string $code, callable $callback) : void
Parameters
- $code : string
-
Type of callback.
- $callback : callable
-
Callback.
clearCache()
Clears all cache by chat id.
public
static clearCache(int $chatId) : void
Parameters
- $chatId : int
-
Internal chat id.
delete()
Delete record.
public
static delete(int $id) : Result
Parameters
- $id : int
-
Record key.
Return values
ResultgetList()
Get records of table.
public
static getList([array<string|int, mixed> $params = array() ]) : Result
Parameters
- $params : array<string|int, mixed> = array()
-
Params array like ORM style.
Return values
ResultgetMap()
Get Map of table.
public
static getMap() : array<string|int, mixed>
Return values
array<string|int, mixed>unbindingBlock()
Unbinds block from chat.
public
static unbindingBlock(int $blockId) : void
Parameters
- $blockId : int
-
Block id.
update()
Update record.
public
static update(int $id[, array<string|int, mixed> $fields = array() ]) : Result
Parameters
- $id : int
-
Record key.
- $fields : array<string|int, mixed> = array()
-
Fields array.