LibreDTE

AbstractBook
in package
implements BookInterface

AbstractYes

Clase abstracta (base) de la representación de un libro tributario electrónico.

El libro es una vista sobre el XmlDocumentInterface que lo contiene; todos los datos se derivan del XML mediante consultas XPath.

Table of Contents

Interfaces

BookInterface
Interfaz base para todos los libros tributarios electrónicos.

Properties

$tipo  : TipoLibro
Tipo de libro.
$xmlDocument  : XmlDocumentInterface

Methods

__construct()  : mixed
Constructor del libro tributario.
countDetalle()  : int
Entrega la cantidad de registros de detalle del libro.
getCaratula()  : array<string, mixed>
Entrega la carátula del libro.
getDetalle()  : array<string|int, array<string|int, mixed>>
Entrega los registros de detalle del libro.
getId()  : string
Entrega el identificador único del documento de envío del libro.
getResumen()  : array<string, mixed>
Entrega el resumen del libro.
getSignatureNamespace()  : string|null
Entrega el namespace XML que debe usarse en el elemento `Signature`.
getTipo()  : TipoLibro
Entrega el tipo de libro.
getXml()  : string
Entrega el XML del libro.
getXmlDocument()  : XmlDocumentInterface
Entrega el documento XML del libro.
jsonSerialize()  : array<string|int, mixed>
{@inheritDoc}
toArray()  : array<string|int, mixed>
Entrega los datos del libro como un arreglo.

Properties

$xmlDocument read-only

private XmlDocumentInterface $xmlDocument

Methods

__construct()

Constructor del libro tributario.

public __construct(XmlDocumentInterface $xmlDocument) : mixed
Parameters
$xmlDocument : XmlDocumentInterface

Instancia del documento XML asociado al libro.

countDetalle()

Entrega la cantidad de registros de detalle del libro.

public countDetalle() : int
Return values
int

getCaratula()

Entrega la carátula del libro.

public getCaratula() : array<string, mixed>
Return values
array<string, mixed>

getDetalle()

Entrega los registros de detalle del libro.

public getDetalle() : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>>

getId()

Entrega el identificador único del documento de envío del libro.

public getId() : string

Por defecto busca el atributo ID en el elemento EnvioLibro. Las subclases que usen un elemento diferente (p. ej. DocumentoConsumoFolios) deben sobrescribir este método.

Return values
string

getResumen()

Entrega el resumen del libro.

public getResumen() : array<string, mixed>
Return values
array<string, mixed>

getSignatureNamespace()

Entrega el namespace XML que debe usarse en el elemento `Signature`.

public getSignatureNamespace() : string|null
Return values
string|null

Namespace URI, o null para usar el estándar.

getXml()

Entrega el XML del libro.

public getXml() : string
Return values
string

XML del libro.

getXmlDocument()

Entrega el documento XML del libro.

public getXmlDocument() : XmlDocumentInterface
Return values
XmlDocumentInterface

jsonSerialize()

{@inheritDoc}

public jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

toArray()

Entrega los datos del libro como un arreglo.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results