DataChange
in package
implements
JsonSerializable
Class DataChange
Tags
Interfaces, Classes and Traits
- JsonSerializable
Table of Contents
- $action : string
- $idColumn : string
- $queryBuilder : CI_DB_query_builder
- $rowId : int
- $table : string
- __construct() : mixed
- DataChange constructor.
- getAction() : string
- Returns the action type of the change ('update', 'delete').
- getIdColumn() : string
- Returns the database table ID column.
- getPayload() : array<string|int, mixed>
- Returns the payload of the change (lazy loading).
- getRowId() : string
- Returns the database row ID of the change.
- getTable() : string
- Returns the database table of the change.
- jsonSerialize() : mixed
- Json encode the data change instance.
Properties
$action
protected
string
$action
$idColumn
protected
string
$idColumn
$queryBuilder
protected
CI_DB_query_builder
$queryBuilder
$rowId
protected
int
$rowId
$table
protected
string
$table
Methods
__construct()
DataChange constructor.
public
__construct(CI_DB_query_builder $queryBuilder, string $action, string $table, string $idColumn, int $rowId) : mixed
Parameters
- $queryBuilder : CI_DB_query_builder
-
Performs database queries.
- $action : string
-
Action type ("update" or "delete").
- $table : string
-
Database table.
- $idColumn : string
-
Table ID column name.
- $rowId : int
-
Row ID.
Tags
Return values
mixed —getAction()
Returns the action type of the change ('update', 'delete').
public
getAction() : string
Return values
string —getIdColumn()
Returns the database table ID column.
public
getIdColumn() : string
Return values
string —getPayload()
Returns the payload of the change (lazy loading).
public
getPayload() : array<string|int, mixed>
Return values
array<string|int, mixed> —getRowId()
Returns the database row ID of the change.
public
getRowId() : string
Return values
string —getTable()
Returns the database table of the change.
public
getTable() : string
Return values
string —jsonSerialize()
Json encode the data change instance.
public
jsonSerialize() : mixed
Return values
mixed —Data which can be serialized by json_encode, which is a value of any type other than a resource.