Documentation

Daevento extends DaCommon
in package

Table of Contents

Properties

$chCTe  : mixed
$aFont  : array<string|int, mixed>
$cancelFlag  : bool
$CNPJDest  : mixed
$cOrgao  : mixed
$CPFDest  : mixed
$creditos  : string
$cStat  : mixed
$dadosEmitente  : mixed
$debugmode  : bool
$decimalPlaces  : int
$destino  : mixed
$dhEvento  : mixed
$dhRegEvento  : mixed
$errMsg  : mixed
$errStatus  : mixed
$fontePadrao  : string
$formatoChave  : mixed
$hPrint  : float
$id  : mixed
$infCorrecao  : 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
$pdfDir  : mixed
$powered  : bool
$tpAmb  : mixed
$tpEvento  : mixed
$version  : mixed
$wCanhoto  : mixed
$wPrint  : float
$xCondUso  : mixed
$xIni  : float
$xJust  : mixed
$xml  : mixed
$xMotivo  : mixed
$yDados  : mixed
$yIni  : float
$dom  : mixed
$evento  : mixed
$infEvento  : mixed
$procEventoCTe  : 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
Renderiza o pdf e retorna como raw
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 Esta função monta a DAEventoCTe conforme as informações fornecidas para a classe durante sua construção.
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()  : int
header

Properties

$aFont

protected array<string|int, mixed> $aFont = ['font' => 'times', 'size' => 8, 'style' => '']

$cancelFlag

protected bool $cancelFlag = false

$CNPJDest

protected mixed $CNPJDest = ''

$dadosEmitente

protected mixed $dadosEmitente = array()

$decimalPlaces

protected int $decimalPlaces

$dhRegEvento

protected mixed $dhRegEvento

$errStatus

protected mixed $errStatus = false

$fontePadrao

protected string $fontePadrao = 'times'

$formatoChave

protected mixed $formatoChave = "#### #### #### #### #### #### #### #### #### #### ####"

$infCorrecao

protected mixed $infCorrecao

$logoAlign

protected string $logoAlign = 'C'

$orientacao

protected string $orientacao

$papel

protected string|array<string|int, mixed> $papel = 'A4'

$version

protected mixed $version = '0.1.1'

$procEventoCTe

private mixed $procEventoCTe

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

Ativa ou desativa o modo debug

Tags
throws
Exception
Return values
bool

depecNumber()

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()

Renderiza o pdf e retorna como raw

public render([string $logo = '' ]) : string
Parameters
$logo : string = ''
Return values
string

setCancelFlag()

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|false

toTimestamp()

Converte data da NFe YYYY-mm-ddThh:mm:ss-03:00 para timestamp unix

public toTimestamp(string $input) : int
Parameters
$input : string
Return values
int

adjustImage()

Ajusta a imagem do logo

protected adjustImage(string $logo[, bool $turn_bw = false ]) : string
Parameters
$logo : string
$turn_bw : bool = false
Tags
throws
Exception
Return values
string

formatField()

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
author

Marcos Diez

Return values
string

getTagValue()

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
string

loadDoc()

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 Esta função monta a DAEventoCTe conforme as informações fornecidas para a classe durante sua construção.

protected monta([string $logo = '' ]) : string

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 = ''

base64 da logomarca

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(int $x, int $y) : mixed
Parameters
$x : int
$y : int

footer

private footer(int $x, int $y) : mixed
Parameters
$x : int
$y : int

header()

header

private header(int $x, int $y, int $pag) : int
Parameters
$x : int
$y : int
$pag : int
Return values
int

        
On this page

Search results