AuditlogEntity
extends Entity
in package
Table of Contents
Constants
- auditlog = ['exclude_fields' => ['*']]
- Allowed keys: 'exclude_fields': <...> 'object_rel': <...>
- const_values = []
- database = \config\Config::DB_LOG
- db_table = 'auditlog_model'
- pk_field = 'id'
- sanitize = []
- security = ['select' => 'core\EntitySecurity::securitySelect', 'delete' => 'core\EntitySecurity::securityDelete', 'update' => 'core\EntitySecurity::securityUpdate', 'insert' => 'core\EntitySecurity::securityInsert']
- Allowed keys: 'select': <...> 'update': <...> 'delete': <...> 'insert': <...>
- tracking = false
- validations = []
Properties
- $action : mixed
- $actor_id : mixed
- $additional_data : mixed
- $changes : mixed
- $cluster : mixed
- $id : mixed
- $model : mixed
- $nomePagina : mixed
- $nomeUsuario : mixed
- $object_id : mixed
- $object_rel : mixed
- $page_id : mixed
- $remote_addr : mixed
- $timestamp : mixed
Methods
- __construct() : mixed
- delete() : mixed
- delete_where() : mixed
- getAction() : mixed
- getActor_id() : mixed
- getAdditional_data() : mixed
- getAuditlog() : mixed
- getChanges() : mixed
- getCluster() : mixed
- getConst() : mixed
- getConstObj() : mixed
- getDatabase() : mixed
- getDBDriver() : mixed
- getDBTable() : mixed
- getId() : mixed
- getModel() : mixed
- getNomePagina() : mixed
- getNomeUsuario() : mixed
- getObject_id() : mixed
- getObject_rel() : mixed
- getPage_id() : mixed
- getRemote_addr() : mixed
- getTable() : mixed
- getTimestamp() : mixed
- hasField() : mixed
- insert() : null|Entity
- insert_or_select() : null|Entity
- Funcao que insere ou seleciona se existe
- insert_or_update() : array<string|int, mixed>
- Funcao que insere ou atualiza uma entidade no banco de dados
- securityDelete() : bool
- securityInsert() : bool
- securitySelect() : array<string|int, mixed>
- securityUpdate() : bool
- setAction() : mixed
- setActor_id() : mixed
- setAdditional_data() : mixed
- setChanges() : mixed
- setCluster() : mixed
- setId() : mixed
- setModel() : mixed
- setNomePagina() : mixed
- setNomeUsuario() : mixed
- setObject_id() : mixed
- setObject_rel() : mixed
- setPage_id() : mixed
- setRemote_addr() : mixed
- setTimestamp() : mixed
- update() : mixed
- A função update pode atualizar uma Entity já instanciada, desde que a chave primária esteja setada, ou pode atualizar uma Entity vazia informando o valor da chave primária no segundo parâmetro (pk_value)
- validateFields() : bool
- where() : Collection
- Rudimentary ORM functions
Constants
auditlog
Allowed keys: 'exclude_fields': <...> 'object_rel': <...>
public
mixed
auditlog
= ['exclude_fields' => ['*']]
const_values
public
mixed
const_values
= []
database
public
mixed
database
= \config\Config::DB_LOG
db_table
public
mixed
db_table
= 'auditlog_model'
pk_field
public
mixed
pk_field
= 'id'
sanitize
public
mixed
sanitize
= []
security
Allowed keys: 'select': <...> 'update': <...> 'delete': <...> 'insert': <...>
public
mixed
security
= ['select' => 'core\EntitySecurity::securitySelect', 'delete' => 'core\EntitySecurity::securityDelete', 'update' => 'core\EntitySecurity::securityUpdate', 'insert' => 'core\EntitySecurity::securityInsert']
tracking
public
mixed
tracking
= false
validations
public
mixed
validations
= []
Properties
$action
private
mixed
$action
$actor_id
private
mixed
$actor_id
$additional_data
private
mixed
$additional_data
$changes
private
mixed
$changes
$cluster
private
mixed
$cluster
$id
private
mixed
$id
$model
private
mixed
$model
$nomePagina
private
mixed
$nomePagina
$nomeUsuario
private
mixed
$nomeUsuario
$object_id
private
mixed
$object_id
$object_rel
private
mixed
$object_rel
$page_id
private
mixed
$page_id
$remote_addr
private
mixed
$remote_addr
$timestamp
private
mixed
$timestamp
Methods
__construct()
public
__construct([array<string|int, mixed> $values = [] ]) : mixed
Parameters
- $values : array<string|int, mixed> = []
delete()
public
delete(mixed $motivo) : mixed
Parameters
- $motivo : mixed
delete_where()
public
static delete_where(mixed $motivo[, mixed $where = [] ]) : mixed
Parameters
- $motivo : mixed
- $where : mixed = []
getAction()
public
getAction() : mixed
getActor_id()
public
getActor_id() : mixed
getAdditional_data()
public
getAdditional_data() : mixed
getAuditlog()
public
getAuditlog([string|null $key = null ]) : mixed
Parameters
- $key : string|null = null
getChanges()
public
getChanges() : mixed
getCluster()
public
getCluster() : mixed
getConst()
public
static getConst(string $field[, mixed $const_value = null ]) : mixed
Parameters
- $field : string
- $const_value : mixed = null
getConstObj()
public
static getConstObj(string $field[, mixed $const_value = null ]) : mixed
Parameters
- $field : string
- $const_value : mixed = null
getDatabase()
public
getDatabase() : mixed
getDBDriver()
public
static getDBDriver() : mixed
getDBTable()
public
static getDBTable() : mixed
getId()
public
getId() : mixed
getModel()
public
getModel() : mixed
getNomePagina()
public
getNomePagina() : mixed
getNomeUsuario()
public
getNomeUsuario() : mixed
getObject_id()
public
getObject_id() : mixed
getObject_rel()
public
getObject_rel() : mixed
getPage_id()
public
getPage_id() : mixed
getRemote_addr()
public
getRemote_addr() : mixed
getTable()
public
getTable() : mixed
getTimestamp()
public
getTimestamp() : mixed
hasField()
public
static hasField(mixed $field) : mixed
Parameters
- $field : mixed
insert()
public
insert() : null|Entity
Return values
null|Entityinsert_or_select()
Funcao que insere ou seleciona se existe
public
insert_or_select([mixed $where = [] ]) : null|Entity
Parameters
- $where : mixed = []
Return values
null|Entityinsert_or_update()
Funcao que insere ou atualiza uma entidade no banco de dados
public
insert_or_update([mixed $where = [] ][, mixed $update_fields = ['*'] ]) : array<string|int, mixed>
Parameters
- $where : mixed = []
- $update_fields : mixed = ['*']
Return values
array<string|int, mixed>securityDelete()
public
securityDelete(mixed $table, mixed $where) : bool
Parameters
- $table : mixed
- $where : mixed
Return values
boolsecurityInsert()
public
securityInsert(mixed $fields) : bool
Parameters
- $fields : mixed
Return values
bool —return 'true' if the security function didn't find any security issue and 'false' otherwise
securitySelect()
public
securitySelect(mixed $table, mixed $fields, mixed $where) : array<string|int, mixed>
Parameters
- $table : mixed
- $fields : mixed
- $where : mixed
Return values
array<string|int, mixed> —return an array with information to be appended in the SQL select
securityUpdate()
public
securityUpdate(mixed $fields, mixed $where) : bool
Parameters
- $fields : mixed
- $where : mixed
Return values
bool —return 'true' if the security function didn't find any security issue and 'false' otherwise
setAction()
public
setAction(mixed $action) : mixed
Parameters
- $action : mixed
setActor_id()
public
setActor_id(mixed $actor_id) : mixed
Parameters
- $actor_id : mixed
setAdditional_data()
public
setAdditional_data(mixed $additional_data) : mixed
Parameters
- $additional_data : mixed
setChanges()
public
setChanges(mixed $changes) : mixed
Parameters
- $changes : mixed
setCluster()
public
setCluster(mixed $hash) : mixed
Parameters
- $hash : mixed
setId()
public
setId(mixed $id) : mixed
Parameters
- $id : mixed
setModel()
public
setModel(mixed $model) : mixed
Parameters
- $model : mixed
setNomePagina()
public
setNomePagina(mixed $nomePagina) : mixed
Parameters
- $nomePagina : mixed
setNomeUsuario()
public
setNomeUsuario(mixed $nomeUsuario) : mixed
Parameters
- $nomeUsuario : mixed
setObject_id()
public
setObject_id(mixed $object_id) : mixed
Parameters
- $object_id : mixed
setObject_rel()
public
setObject_rel(mixed $object_rel) : mixed
Parameters
- $object_rel : mixed
setPage_id()
public
setPage_id(mixed $page_id) : mixed
Parameters
- $page_id : mixed
setRemote_addr()
public
setRemote_addr(mixed $remote_addr) : mixed
Parameters
- $remote_addr : mixed
setTimestamp()
public
setTimestamp(mixed $timestamp) : mixed
Parameters
- $timestamp : mixed
update()
A função update pode atualizar uma Entity já instanciada, desde que a chave primária esteja setada, ou pode atualizar uma Entity vazia informando o valor da chave primária no segundo parâmetro (pk_value)
public
update(array<string|int, mixed> $values[, mixed $pk_value = null ]) : mixed
Parameters
- $values : array<string|int, mixed>
- $pk_value : mixed = null
validateFields()
public
validateFields([array<string|int, mixed> $fields = [] ]) : bool
Parameters
- $fields : array<string|int, mixed> = []
Return values
boolwhere()
Rudimentary ORM functions
public
static where([mixed $where = [] ][, mixed $select = '*' ]) : Collection
Parameters
- $where : mixed = []
- $select : mixed = '*'