EnderecoEntity
extends Entity
in package
Table of Contents
Constants
- auditlog = ['object_rel' => 'idEntidade', 'exclude_fields' => ['DataHora']]
- Allowed keys: 'exclude_fields': <...> 'object_rel': <...>
- const_values = []
- database = \config\Config::DB_DEFAULT
- db_table = 'pessoa_enderecos'
- pk_field = 'idEndereco'
- sanitize = ['CEP' => 'onlyNumber']
- security = ['select' => 'core\EntitySecurity::securitySelect', 'delete' => 'core\EntitySecurity::securityDelete', 'update' => 'core\EntitySecurity::securityUpdate', 'insert' => 'core\EntitySecurity::securityInsert']
- Allowed keys: 'select': <...> 'update': <...> 'delete': <...> 'insert': <...>
- tracking = true
- validations = []
Properties
- $Bairro : mixed
- $CEP : mixed
- $Cidade : mixed
- $Complemento : mixed
- $DataHora : mixed
- $Endereco : mixed
- $id_municipio : mixed
- $idEndereco : mixed
- $idEntidade : mixed
- $idEntidadeNfe : mixed
- $idPais : mixed
- $idUsuario : mixed
- $Numero : mixed
- $Referencia : mixed
- $tipo : mixed
- $UF : mixed
Methods
- __construct() : mixed
- delete() : mixed
- delete_where() : mixed
- getAuditlog() : mixed
- getBairro() : mixed
- Get the value of Bairro
- getCEP() : mixed
- Get the value of CEP
- getCidade() : mixed
- Get the value of Cidade
- getComplemento() : mixed
- Get the value of Complemento
- getConst() : mixed
- getConstObj() : mixed
- getDatabase() : mixed
- getDataHora() : mixed
- Get the value of DataHora
- getDBDriver() : mixed
- getDBTable() : mixed
- getEndereco() : mixed
- Get the value of Endereco
- getId_municipio() : mixed
- Get the value of id_municipio
- getIdEndereco() : mixed
- Get the value of idEndereco
- getIdEntidade() : mixed
- Get the value of idEntidade
- getIdEntidadeNfe() : mixed
- Get the value of idEntidadeNfe
- getIdPais() : mixed
- Get the value of idPais
- getIdUsuario() : mixed
- Get the value of idUsuario
- getNumero() : mixed
- Get the value of Numero
- getReferencia() : mixed
- Get the value of Referencia
- getTable() : mixed
- getTipo() : mixed
- Get the value of tipo
- getUF() : mixed
- Get the value of UF
- 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
- setBairro() : self
- Set the value of Bairro
- setCEP() : self
- Set the value of CEP
- setCidade() : self
- Set the value of Cidade
- setComplemento() : self
- Set the value of Complemento
- setDataHora() : self
- Set the value of DataHora
- setEndereco() : self
- Set the value of Endereco
- setId_municipio() : self
- Set the value of id_municipio
- setIdEndereco() : self
- Set the value of idEndereco
- setIdEntidade() : self
- Set the value of idEntidade
- setIdEntidadeNfe() : self
- Set the value of idEntidadeNfe
- setIdPais() : self
- Set the value of idPais
- setIdUsuario() : self
- Set the value of idUsuario
- setNumero() : self
- Set the value of Numero
- setReferencia() : self
- Set the value of Referencia
- setTipo() : self
- Set the value of tipo
- setUF() : self
- Set the value of UF
- 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
= ['object_rel' => 'idEntidade', 'exclude_fields' => ['DataHora']]
const_values
public
mixed
const_values
= []
database
public
mixed
database
= \config\Config::DB_DEFAULT
db_table
public
mixed
db_table
= 'pessoa_enderecos'
pk_field
public
mixed
pk_field
= 'idEndereco'
sanitize
public
mixed
sanitize
= ['CEP' => 'onlyNumber']
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
= true
validations
public
mixed
validations
= []
Properties
$Bairro
private
mixed
$Bairro
$CEP
private
mixed
$CEP
$Cidade
private
mixed
$Cidade
$Complemento
private
mixed
$Complemento
$DataHora
private
mixed
$DataHora
$Endereco
private
mixed
$Endereco
$id_municipio
private
mixed
$id_municipio
$idEndereco
private
mixed
$idEndereco
$idEntidade
private
mixed
$idEntidade
$idEntidadeNfe
private
mixed
$idEntidadeNfe
$idPais
private
mixed
$idPais
$idUsuario
private
mixed
$idUsuario
$Numero
private
mixed
$Numero
$Referencia
private
mixed
$Referencia
$tipo
private
mixed
$tipo
$UF
private
mixed
$UF
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
getBairro()
Get the value of Bairro
public
getBairro() : mixed
getCEP()
Get the value of CEP
public
getCEP() : mixed
getCidade()
Get the value of Cidade
public
getCidade() : mixed
getComplemento()
Get the value of Complemento
public
getComplemento() : 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
getDataHora()
Get the value of DataHora
public
getDataHora() : mixed
getDBDriver()
public
static getDBDriver() : mixed
getDBTable()
public
static getDBTable() : mixed
getEndereco()
Get the value of Endereco
public
getEndereco() : mixed
getId_municipio()
Get the value of id_municipio
public
getId_municipio() : mixed
getIdEndereco()
Get the value of idEndereco
public
getIdEndereco() : mixed
getIdEntidade()
Get the value of idEntidade
public
getIdEntidade() : mixed
getIdEntidadeNfe()
Get the value of idEntidadeNfe
public
getIdEntidadeNfe() : mixed
getIdPais()
Get the value of idPais
public
getIdPais() : mixed
getIdUsuario()
Get the value of idUsuario
public
getIdUsuario() : mixed
getNumero()
Get the value of Numero
public
getNumero() : mixed
getReferencia()
Get the value of Referencia
public
getReferencia() : mixed
getTable()
public
getTable() : mixed
getTipo()
Get the value of tipo
public
getTipo() : mixed
getUF()
Get the value of UF
public
getUF() : 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
setBairro()
Set the value of Bairro
public
setBairro(mixed $Bairro) : self
Parameters
- $Bairro : mixed
Return values
selfsetCEP()
Set the value of CEP
public
setCEP(mixed $CEP) : self
Parameters
- $CEP : mixed
Return values
selfsetCidade()
Set the value of Cidade
public
setCidade(mixed $Cidade) : self
Parameters
- $Cidade : mixed
Return values
selfsetComplemento()
Set the value of Complemento
public
setComplemento(mixed $Complemento) : self
Parameters
- $Complemento : mixed
Return values
selfsetDataHora()
Set the value of DataHora
public
setDataHora(mixed $DataHora) : self
Parameters
- $DataHora : mixed
Return values
selfsetEndereco()
Set the value of Endereco
public
setEndereco(mixed $Endereco) : self
Parameters
- $Endereco : mixed
Return values
selfsetId_municipio()
Set the value of id_municipio
public
setId_municipio(mixed $id_municipio) : self
Parameters
- $id_municipio : mixed
Return values
selfsetIdEndereco()
Set the value of idEndereco
public
setIdEndereco(mixed $idEndereco) : self
Parameters
- $idEndereco : mixed
Return values
selfsetIdEntidade()
Set the value of idEntidade
public
setIdEntidade(mixed $idEntidade) : self
Parameters
- $idEntidade : mixed
Return values
selfsetIdEntidadeNfe()
Set the value of idEntidadeNfe
public
setIdEntidadeNfe(mixed $idEntidadeNfe) : self
Parameters
- $idEntidadeNfe : mixed
Return values
selfsetIdPais()
Set the value of idPais
public
setIdPais(mixed $idPais) : self
Parameters
- $idPais : mixed
Return values
selfsetIdUsuario()
Set the value of idUsuario
public
setIdUsuario(mixed $idUsuario) : self
Parameters
- $idUsuario : mixed
Return values
selfsetNumero()
Set the value of Numero
public
setNumero(mixed $Numero) : self
Parameters
- $Numero : mixed
Return values
selfsetReferencia()
Set the value of Referencia
public
setReferencia(mixed $Referencia) : self
Parameters
- $Referencia : mixed
Return values
selfsetTipo()
Set the value of tipo
public
setTipo(mixed $tipo) : self
Parameters
- $tipo : mixed
Return values
selfsetUF()
Set the value of UF
public
setUF(mixed $UF) : self
Parameters
- $UF : 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 = '*'