Convert
in package
Table of Contents
Constants
Properties
- $baselayout : mixed
- $dados : mixed
- $layouts : mixed
- $notas : mixed
- $numNFe : mixed
- $txt : mixed
- $xmls : mixed
Methods
- __construct() : mixed
- Constructor method
- dump() : array<string|int, mixed>
- Convert all nfe in XML, one by one
- parse() : array<string|int, mixed>
- Static method to convert Txt to Xml
- parseDump() : array<string|int, mixed>
- Static method to convert Txt to Xml
- toXml() : array<string|int, mixed>
- Convert all nfe in XML, one by one
- checkQtdNFe() : mixed
- Verify number of NFe declared If different throws an exception
- isNFe() : bool
- Check if it is an NFe in TXT format
- isValidTxt() : mixed
- Valid txt structure
- loadLayoutsVersions() : mixed
- Read and set all layouts versions in NFes
- sliceNotas() : array<string|int, mixed>
- Separate nfe into elements of an array
- validNotas() : mixed
- Valid all NFes in txt and get layout version for each nfe
Constants
LOCAL
public
mixed
LOCAL
= "LOCAL"
LOCAL_V12
public
mixed
LOCAL_V12
= "LOCAL_V12"
LOCAL_V13
public
mixed
LOCAL_V13
= "LOCAL_V13"
SEBRAE
public
mixed
SEBRAE
= "SEBRAE"
Properties
$baselayout
protected
mixed
$baselayout
$dados
protected
mixed
$dados
$layouts
protected
mixed
$layouts
= []
$notas
protected
mixed
$notas
$numNFe
protected
mixed
$numNFe
= 1
$txt
protected
mixed
$txt
$xmls
protected
mixed
$xmls
= []
Methods
__construct()
Constructor method
public
__construct([string $txt = '' ][, string $baselayout = self::LOCAL ]) : mixed
Parameters
- $txt : string = ''
- $baselayout : string = self::LOCAL
dump()
Convert all nfe in XML, one by one
public
dump() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>parse()
Static method to convert Txt to Xml
public
static parse(string $txt[, string $baselayout = self::LOCAL ]) : array<string|int, mixed>
Parameters
- $txt : string
- $baselayout : string = self::LOCAL
Return values
array<string|int, mixed>parseDump()
Static method to convert Txt to Xml
public
static parseDump(string $txt[, string $baselayout = self::LOCAL ]) : array<string|int, mixed>
Parameters
- $txt : string
- $baselayout : string = self::LOCAL
Return values
array<string|int, mixed>toXml()
Convert all nfe in XML, one by one
public
toXml() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>checkQtdNFe()
Verify number of NFe declared If different throws an exception
protected
checkQtdNFe() : mixed
Tags
isNFe()
Check if it is an NFe in TXT format
protected
isNFe(string $txt) : bool
Parameters
- $txt : string
Return values
boolisValidTxt()
Valid txt structure
protected
isValidTxt(array<string|int, mixed> $nota) : mixed
Parameters
- $nota : array<string|int, mixed>
Tags
loadLayoutsVersions()
Read and set all layouts versions in NFes
protected
loadLayoutsVersions(array<string|int, mixed> $nota) : mixed
Parameters
- $nota : array<string|int, mixed>
sliceNotas()
Separate nfe into elements of an array
protected
sliceNotas(array<string|int, mixed> $array) : array<string|int, mixed>
Parameters
- $array : array<string|int, mixed>
Return values
array<string|int, mixed>validNotas()
Valid all NFes in txt and get layout version for each nfe
protected
validNotas() : mixed