Documentation

Dabpe extends DaCommon
in package

Table of Contents

Properties

$aFont  : array<string|int, mixed>
$aFontTex  : array<string|int, mixed>
$aFontTit  : array<string|int, mixed>
$agencia  : DOMElement
$cancelFlag  : bool
$Comp  : DOMNodeList
$creditos  : string
$cUF  : string
$debugmode  : bool
$decimalPlaces  : int
$dhCont  : string
$dom  : Dom
$emit  : DOMElement
$enderAgencia  : DOMElement
$enderEmit  : DOMElement
$fontePadrao  : string
$hBoxLinha  : int
$hLinha  : int
$hMaxLinha  : int
$hPrint  : float
$ICMSSN  : DOMElement
$ide  : DOMElement
$infAdic  : string
$infBPe  : DOMElement
$infBPeSupl  : DOMElement
$infPassageiro  : DOMElement
$infPassagem  : DOMElement
$infProt  : DOMElement
$infValorBPe  : DOMElement
$infViagem  : DOMElement
$logoAlign  : string
$logomarca  : string
$margemInterna  : int
$margesq  : int
$marginf  : int
$margsup  : int
$maxH  : float
$maxW  : float
$nBP  : DOMElement
$numdepec  : string
$orientacao  : string
$pag  : DOMNodeList
$papel  : string|array<string|int, mixed>
$paperwidth  : int
$pdf  : Pdf
$powered  : bool
$protBPe  : DOMElement
$qrCodBPe  : string|null
$textoAdic  : string
$tpEmis  : int
$urlChave  : string
$wPrint  : float
$xIni  : float
$xml  : string
$yIni  : float

Methods

__construct()  : void
Construtor
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
setPaperWidth()  : mixed
Seta a largura do papel de impressão
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
cabecalhoAgencia()  : float
Coloca o cabeçalho da agencia
cabecalhoDABPE()  : float
Monta o cabeçalho do BPe
cabecalhoSecundarioDABPE()  : float
Cabeçalho secundário com os dados da viagem
checkCancelada()  : mixed
checkNaoAutorizada()  : mixed
checkSubstituto()  : mixed
fiscalDABPE()  : mixed
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
infAdic()  : mixed
modulo11()  : int
camcula digito de controle modulo 11
monta()  : mixed
Monta o pdf
pagamentosDABPE()  : mixed
produtosDABPE()  : mixed
qrCodeDABPE()  : mixed
tipoPag()  : mixed
totalDABPE()  : mixed
urlConsulta()  : string
Busca a url de consulta
ymdTodmy()  : string
Converte datas no formato YMD (ex. 2009-11-02) para o formato brasileiro 02/11/2009)

Properties

$aFont

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

$aFontTex

protected array<string|int, mixed> $aFontTex

$aFontTit

protected array<string|int, mixed> $aFontTit

$agencia

protected DOMElement $agencia

$cancelFlag

protected bool $cancelFlag = false

$Comp

protected DOMNodeList $Comp

$creditos

protected string $creditos

$decimalPlaces

protected int $decimalPlaces

$dhCont

protected string $dhCont

$emit

protected DOMElement $emit

$enderAgencia

protected DOMElement $enderAgencia

$enderEmit

protected DOMElement $enderEmit

$fontePadrao

protected string $fontePadrao = 'times'

$hBoxLinha

protected int $hBoxLinha = 6

$hLinha

protected int $hLinha = 3

$hMaxLinha

protected int $hMaxLinha = 9

$ICMSSN

protected DOMElement $ICMSSN

$ide

protected DOMElement $ide

$infAdic

protected string $infAdic

$infBPe

protected DOMElement $infBPe

$infBPeSupl

protected DOMElement $infBPeSupl

$infPassageiro

protected DOMElement $infPassageiro

$infPassagem

protected DOMElement $infPassagem

$infProt

protected DOMElement $infProt

$infValorBPe

protected DOMElement $infValorBPe

$infViagem

protected DOMElement $infViagem

$logoAlign

protected string $logoAlign = 'C'

$margemInterna

protected int $margemInterna = 2

$nBP

protected DOMElement $nBP

$orientacao

protected string $orientacao

$pag

protected DOMNodeList $pag

$papel

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

$paperwidth

protected int $paperwidth = 80

$protBPe

protected DOMElement $protBPe

$qrCodBPe

protected string|null $qrCodBPe

$textoAdic

protected string $textoAdic

$tpEmis

protected int $tpEmis

$urlChave

protected string $urlChave

Methods

__construct()

Construtor

public __construct(string $xml) : void
Parameters
$xml : string
Tags
throws
Exception

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([mixed $orientacao = '' ][, mixed $papel = 'A4' ][, mixed $margSup = 2 ][, mixed $margEsq = 2 ]) : void
Parameters
$orientacao : mixed = ''
$papel : mixed = 'A4'
$margSup : mixed = 2
$margEsq : mixed = 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'

setPaperWidth()

Seta a largura do papel de impressão

public setPaperWidth([int $width = 80 ]) : mixed
Parameters
$width : int = 80

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

cabecalhoAgencia()

Coloca o cabeçalho da agencia

protected cabecalhoAgencia([float $x = 0.0 ][, float $y = 0.0 ][, float $h = 0.0 ]) : float
Parameters
$x : float = 0.0
$y : float = 0.0
$h : float = 0.0
Return values
float

cabecalhoDABPE()

Monta o cabeçalho do BPe

protected cabecalhoDABPE([float $x = 0.0 ][, float $y = 0.0 ][, float $h = 0.0 ]) : float
Parameters
$x : float = 0.0
$y : float = 0.0
$h : float = 0.0
Return values
float

cabecalhoSecundarioDABPE()

Cabeçalho secundário com os dados da viagem

protected cabecalhoSecundarioDABPE([float $x = 0.0 ][, float $y = 0.0 ][, float $h = 0.0 ]) : float
Parameters
$x : float = 0.0
$y : float = 0.0
$h : float = 0.0
Return values
float

checkCancelada()

protected checkCancelada() : mixed

checkNaoAutorizada()

protected checkNaoAutorizada() : mixed

checkSubstituto()

protected checkSubstituto() : mixed

fiscalDABPE()

protected fiscalDABPE([mixed $x = 0 ][, mixed $y = 0 ][, mixed $h = 0 ]) : mixed
Parameters
$x : mixed = 0
$y : mixed = 0
$h : mixed = 0

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

infAdic()

protected infAdic([mixed $x = 0 ][, mixed $y = 0 ][, mixed $h = 0 ]) : mixed
Parameters
$x : mixed = 0
$y : mixed = 0
$h : mixed = 0

modulo11()

camcula digito de controle modulo 11

protected modulo11([string $numero = '' ]) : int
Parameters
$numero : string = ''
Return values
int

modulo11 do numero passado

monta()

Monta o pdf

protected monta([string|null $logo = null ]) : mixed
Parameters
$logo : string|null = null

pagamentosDABPE()

protected pagamentosDABPE([mixed $x = 0 ][, mixed $y = 0 ][, mixed $h = 0 ]) : mixed
Parameters
$x : mixed = 0
$y : mixed = 0
$h : mixed = 0

produtosDABPE()

protected produtosDABPE([mixed $x = 0 ][, mixed $y = 0 ][, mixed $h = 0 ]) : mixed
Parameters
$x : mixed = 0
$y : mixed = 0
$h : mixed = 0

qrCodeDABPE()

protected qrCodeDABPE([mixed $x = 0 ][, mixed $y = 0 ][, mixed $h = 0 ]) : mixed
Parameters
$x : mixed = 0
$y : mixed = 0
$h : mixed = 0

tipoPag()

protected tipoPag(mixed $tPag) : mixed
Parameters
$tPag : mixed

totalDABPE()

protected totalDABPE([mixed $x = 0 ][, mixed $y = 0 ][, mixed $h = 0 ]) : mixed
Parameters
$x : mixed = 0
$y : mixed = 0
$h : mixed = 0

urlConsulta()

Busca a url de consulta

protected urlConsulta(string $uf) : string
Parameters
$uf : string
Return values
string

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


        
On this page

Search results