Daevento
extends DaCommon
in package
Table of Contents
Properties
- $chNFe : mixed
- $aFont : array<string|int, mixed>
- $cancelFlag : bool
- $CNPJDest : mixed
- $cOrgao : mixed
- $CPFDest : mixed
- $creditos : string
- $cStat : mixed
- $dadosEmitente : mixed
- $debugmode : bool
- $decimalPlaces : int
- $dhEvento : mixed
- $dhRegEvento : mixed
- $errMsg : mixed
- $errStatus : mixed
- $fontePadrao : string
- $formatoChave : mixed
- $hPrint : float
- $id : mixed
- $logoAlign : string
- $logomarca : string
- $margesq : int
- $marginf : int
- $margsup : int
- $maxH : float
- $maxW : float
- $nProt : mixed
- $numdepec : string
- $orientacao : string
- $papel : string|array<string|int, mixed>
- $pdf : Pdf
- $powered : bool
- $tpAmb : mixed
- $tpEvento : mixed
- $version : mixed
- $wCanhoto : mixed
- $wPrint : float
- $xCondUso : mixed
- $xCorrecao : mixed
- $xIni : float
- $xJust : mixed
- $xml : mixed
- $xMotivo : mixed
- $yDados : mixed
- $yIni : float
- $dom : mixed
- $evento : mixed
- $infEvento : mixed
- $procEventoNFe : mixed
- $retEvento : mixed
- $rinfEvento : mixed
Methods
- __construct() : mixed
- __construct
- creditsIntegratorFooter() : void
- Add the credits to the integrator in the footer message
- debugMode() : bool
- Ativa ou desativa o modo debug
- depecNumber() : void
- Numero DPEC
- logoParameters() : void
- Set logo e sua posição
- printParameters() : void
- Define parametros de impressão
- render() : string
- Dados brutos do PDF
- setCancelFlag() : mixed
- Atribui uma sinalização de cancelamento externa
- setDefaultDecimalPlaces() : mixed
- Seta o numero de casas decimais a serem usadas como padrão
- setDefaultFont() : mixed
- Seta a fonte padrão é times
- toDateTime() : DateTime|false
- Converte data da NFe YYYY-mm-ddThh:mm:ss-03:00 para \DateTime
- toTimestamp() : int
- Converte data da NFe YYYY-mm-ddThh:mm:ss-03:00 para timestamp unix
- adjustImage() : string
- Ajusta a imagem do logo
- formatField() : string
- Função de formatação de strings onde o cerquilha # é um coringa que será substituido por digitos contidos em campo.
- getTagDate() : string
- Recupera e reformata a data do padrão da NFe para dd/mm/aaaa
- getTagValue() : string
- Extrai o valor do node DOM
- loadDoc() : mixed
- modulo11() : int
- camcula digito de controle modulo 11
- monta() : string
- monta
- tipoPag() : mixed
- ymdTodmy() : string
- Converte datas no formato YMD (ex. 2009-11-02) para o formato brasileiro 02/11/2009)
- body() : mixed
- body
- footer() : mixed
- footer
- header() : number
- header
Properties
$chNFe
public
mixed
$chNFe
$aFont
protected
array<string|int, mixed>
$aFont
= ['font' => 'times', 'size' => 8, 'style' => '']
$cancelFlag
protected
bool
$cancelFlag
= false
$CNPJDest
protected
mixed
$CNPJDest
= ''
$cOrgao
protected
mixed
$cOrgao
$CPFDest
protected
mixed
$CPFDest
= ''
$creditos
protected
string
$creditos
$cStat
protected
mixed
$cStat
$dadosEmitente
protected
mixed
$dadosEmitente
= array()
$debugmode
protected
bool
$debugmode
$decimalPlaces
protected
int
$decimalPlaces
$dhEvento
protected
mixed
$dhEvento
$dhRegEvento
protected
mixed
$dhRegEvento
$errMsg
protected
mixed
$errMsg
= ''
$errStatus
protected
mixed
$errStatus
= false
$fontePadrao
protected
string
$fontePadrao
= 'times'
$formatoChave
protected
mixed
$formatoChave
= "#### #### #### #### #### #### #### #### #### #### ####"
$hPrint
protected
float
$hPrint
$id
protected
mixed
$id
$logoAlign
protected
string
$logoAlign
= 'C'
$logomarca
protected
string
$logomarca
$margesq
protected
int
$margesq
= 2
$marginf
protected
int
$marginf
= 2
$margsup
protected
int
$margsup
= 2
$maxH
protected
float
$maxH
$maxW
protected
float
$maxW
$nProt
protected
mixed
$nProt
$numdepec
protected
string
$numdepec
$orientacao
protected
string
$orientacao
$papel
protected
string|array<string|int, mixed>
$papel
= 'A4'
protected
Pdf
$pdf
$powered
protected
bool
$powered
= true
$tpAmb
protected
mixed
$tpAmb
$tpEvento
protected
mixed
$tpEvento
$version
protected
mixed
$version
= '0.1.4'
$wCanhoto
protected
mixed
$wCanhoto
$wPrint
protected
float
$wPrint
$xCondUso
protected
mixed
$xCondUso
$xCorrecao
protected
mixed
$xCorrecao
$xIni
protected
float
$xIni
$xJust
protected
mixed
$xJust
$xml
protected
mixed
$xml
$xMotivo
protected
mixed
$xMotivo
$yDados
protected
mixed
$yDados
= 0
$yIni
protected
float
$yIni
$dom
private
mixed
$dom
$evento
private
mixed
$evento
$infEvento
private
mixed
$infEvento
$procEventoNFe
private
mixed
$procEventoNFe
$retEvento
private
mixed
$retEvento
$rinfEvento
private
mixed
$rinfEvento
Methods
__construct()
__construct
public
__construct(string $xml, array<string|int, mixed> $dadosEmitente) : mixed
Parameters
- $xml : string
-
Arquivo XML (diretório ou string)
- $dadosEmitente : array<string|int, mixed>
-
Dados do endereço do emitente
creditsIntegratorFooter()
Add the credits to the integrator in the footer message
public
creditsIntegratorFooter([string $message = '' ][, bool $powered = true ]) : void
Parameters
- $message : string = ''
-
Mensagem do integrador a ser impressa no rodapé das paginas
- $powered : bool = true
debugMode()
Ativa ou desativa o modo debug
public
debugMode([bool $activate = null ]) : bool
Parameters
- $activate : bool = null
Return values
booldepecNumber()
Numero DPEC
public
depecNumber(string $numdepec) : void
Parameters
- $numdepec : string
logoParameters()
Set logo e sua posição
public
logoParameters(string $logo[, string $logoAlign = null ][, bool $mode_bw = false ]) : void
Parameters
- $logo : string
- $logoAlign : string = null
- $mode_bw : bool = false
-
se true converte a imagem em branco e preto
printParameters()
Define parametros de impressão
public
printParameters([string $orientacao = '' ][, string $papel = 'A4' ][, int $margSup = 2 ][, int $margEsq = 2 ]) : void
Parameters
- $orientacao : string = ''
- $papel : string = 'A4'
- $margSup : int = 2
- $margEsq : int = 2
render()
Dados brutos do PDF
public
render([mixed $logo = null ]) : string
Parameters
- $logo : mixed = null
Return values
stringsetCancelFlag()
Atribui uma sinalização de cancelamento externa
public
setCancelFlag([bool $cancelFlag = true ]) : mixed
Parameters
- $cancelFlag : bool = true
setDefaultDecimalPlaces()
Seta o numero de casas decimais a serem usadas como padrão
public
setDefaultDecimalPlaces(int $dec) : mixed
Parameters
- $dec : int
setDefaultFont()
Seta a fonte padrão é times
public
setDefaultFont([string $font = 'times' ]) : mixed
Parameters
- $font : string = 'times'
toDateTime()
Converte data da NFe YYYY-mm-ddThh:mm:ss-03:00 para \DateTime
public
toDateTime(string $input) : DateTime|false
Parameters
- $input : string
Return values
DateTime|falsetoTimestamp()
Converte data da NFe YYYY-mm-ddThh:mm:ss-03:00 para timestamp unix
public
toTimestamp(string $input) : int
Parameters
- $input : string
Return values
intadjustImage()
Ajusta a imagem do logo
protected
adjustImage(string $logo[, bool $turn_bw = false ]) : string
Parameters
- $logo : string
- $turn_bw : bool = false
Tags
Return values
stringformatField()
Função de formatação de strings onde o cerquilha # é um coringa que será substituido por digitos contidos em campo.
protected
formatField([string $campo = '' ][, string $mascara = '' ]) : string
Parameters
- $campo : string = ''
-
String a ser formatada
- $mascara : string = ''
-
Regra de formatção da string (ex. ##.###.###/####-##)
Return values
string —Retorna o campo formatado
getTagDate()
Recupera e reformata a data do padrão da NFe para dd/mm/aaaa
protected
getTagDate(DOM $theObj, string $keyName[, string $extraText = '' ]) : string
Parameters
- $theObj : DOM
- $keyName : string
-
identificador da TAG do xml
- $extraText : string = ''
-
prefixo do retorno
Tags
Return values
stringgetTagValue()
Extrai o valor do node DOM
protected
getTagValue(object $theObj, string $keyName[, string $extraTextBefore = '' ][, mixed $extraTextAfter = '' ][, mixed $itemNum = 0 ]) : string
Parameters
- $theObj : object
-
Instancia de DOMDocument ou DOMElement
- $keyName : string
-
identificador da TAG do xml
- $extraTextBefore : string = ''
-
prefixo do retorno
- $extraTextAfter : mixed = ''
- $itemNum : mixed = 0
Return values
stringloadDoc()
protected
loadDoc(mixed $xml) : mixed
Parameters
- $xml : mixed
modulo11()
camcula digito de controle modulo 11
protected
modulo11([string $numero = '' ]) : int
Parameters
- $numero : string = ''
Return values
int —modulo11 do numero passado
monta()
monta
protected
monta([string $logo = '' ]) : string
Esta função monta a DaEventoNFe conforme as informações fornecidas para a classe durante sua construção. A definição de margens e posições iniciais para a impressão são estabelecidas no pelo conteúdo da funçao e podem ser modificados.
Parameters
- $logo : string = ''
Return values
string —O ID do evento extraido do arquivo XML
tipoPag()
protected
tipoPag(mixed $tPag) : mixed
Parameters
- $tPag : mixed
ymdTodmy()
Converte datas no formato YMD (ex. 2009-11-02) para o formato brasileiro 02/11/2009)
protected
ymdTodmy([string $data = '' ]) : string
Parameters
- $data : string = ''
-
Parâmetro extraido da NFe
Return values
string —Formatada para apresentação da data no padrão brasileiro
body()
body
private
body(number $x, number $y) : mixed
Parameters
- $x : number
- $y : number
footer()
footer
private
footer(number $x, number $y) : mixed
Parameters
- $x : number
- $y : number
header()
header
private
header(number $x, number $y, number $pag) : number
Parameters
- $x : number
- $y : number
- $pag : number