CstEntity
extends Entity
in package
Table of Contents
Constants
- auditlog = []
- Allowed keys: 'exclude_fields': <...> 'object_rel': <...>
- const_values = []
- database = \config\Config::DB_DEFAULT
- db_table = 'nfe_cst'
- pk_field = 'idCst'
- 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
- $codigo : mixed
- $descricao : mixed
- $exigeTributacao : mixed
- $idCst : mixed
- $monofasica : mixed
- $reducaoAliquota : mixed
- $reducaoBC_CST : mixed
- $status : mixed
- $transferenciaCredito : mixed
Methods
- __construct() : mixed
- delete() : mixed
- delete_where() : mixed
- getAuditlog() : mixed
- getCodigo() : mixed
- Get the value of codigo
- getConst() : mixed
- getConstObj() : mixed
- getDatabase() : mixed
- getDBDriver() : mixed
- getDBTable() : mixed
- getDescricao() : mixed
- Get the value of descricao
- getExigeTributacao() : mixed
- Get the value of exigeTributacao
- getIdCst() : mixed
- Get the value of idCst
- getMonofasica() : mixed
- Get the value of monofasica
- getReducaoAliquota() : mixed
- Get the value of reducaoAliquota
- getReducaoBC_CST() : mixed
- Get the value of reducaoBC_CST
- getStatus() : mixed
- Get the value of status
- getTable() : mixed
- getTransferenciaCredito() : mixed
- Get the value of transferenciaCredito
- 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
- setCodigo() : self
- Set the value of codigo
- setDescricao() : self
- Set the value of descricao
- setExigeTributacao() : self
- Set the value of exigeTributacao
- setIdCst() : self
- Set the value of idCst
- setMonofasica() : self
- Set the value of monofasica
- setReducaoAliquota() : self
- Set the value of reducaoAliquota
- setReducaoBC_CST() : self
- Set the value of reducaoBC_CST
- setStatus() : self
- Set the value of status
- setTransferenciaCredito() : self
- Set the value of transferenciaCredito
- 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
= []
const_values
public
mixed
const_values
= []
database
public
mixed
database
= \config\Config::DB_DEFAULT
db_table
public
mixed
db_table
= 'nfe_cst'
pk_field
public
mixed
pk_field
= 'idCst'
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
$codigo
private
mixed
$codigo
$descricao
private
mixed
$descricao
$exigeTributacao
private
mixed
$exigeTributacao
$idCst
private
mixed
$idCst
$monofasica
private
mixed
$monofasica
$reducaoAliquota
private
mixed
$reducaoAliquota
$reducaoBC_CST
private
mixed
$reducaoBC_CST
$status
private
mixed
$status
$transferenciaCredito
private
mixed
$transferenciaCredito
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 = []
getAuditlog()
public
getAuditlog([string|null $key = null ]) : mixed
Parameters
- $key : string|null = null
getCodigo()
Get the value of codigo
public
getCodigo() : 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
getDescricao()
Get the value of descricao
public
getDescricao() : mixed
getExigeTributacao()
Get the value of exigeTributacao
public
getExigeTributacao() : mixed
getIdCst()
Get the value of idCst
public
getIdCst() : mixed
getMonofasica()
Get the value of monofasica
public
getMonofasica() : mixed
getReducaoAliquota()
Get the value of reducaoAliquota
public
getReducaoAliquota() : mixed
getReducaoBC_CST()
Get the value of reducaoBC_CST
public
getReducaoBC_CST() : mixed
getStatus()
Get the value of status
public
getStatus() : mixed
getTable()
public
getTable() : mixed
getTransferenciaCredito()
Get the value of transferenciaCredito
public
getTransferenciaCredito() : 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
setCodigo()
Set the value of codigo
public
setCodigo(mixed $codigo) : self
Parameters
- $codigo : mixed
Return values
selfsetDescricao()
Set the value of descricao
public
setDescricao(mixed $descricao) : self
Parameters
- $descricao : mixed
Return values
selfsetExigeTributacao()
Set the value of exigeTributacao
public
setExigeTributacao(mixed $exigeTributacao) : self
Parameters
- $exigeTributacao : mixed
Return values
selfsetIdCst()
Set the value of idCst
public
setIdCst(mixed $idCst) : self
Parameters
- $idCst : mixed
Return values
selfsetMonofasica()
Set the value of monofasica
public
setMonofasica(mixed $monofasica) : self
Parameters
- $monofasica : mixed
Return values
selfsetReducaoAliquota()
Set the value of reducaoAliquota
public
setReducaoAliquota(mixed $reducaoAliquota) : self
Parameters
- $reducaoAliquota : mixed
Return values
selfsetReducaoBC_CST()
Set the value of reducaoBC_CST
public
setReducaoBC_CST(mixed $reducaoBC_CST) : self
Parameters
- $reducaoBC_CST : mixed
Return values
selfsetStatus()
Set the value of status
public
setStatus(mixed $status) : self
Parameters
- $status : mixed
Return values
selfsetTransferenciaCredito()
Set the value of transferenciaCredito
public
setTransferenciaCredito(mixed $transferenciaCredito) : self
Parameters
- $transferenciaCredito : mixed
Return values
selfupdate()
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 = '*'