DocumentInterface
in
Interfaz para la clase que representa un documento que se enviará en un sobre.
Table of Contents
Methods
- addAttachment() : static
- Agrega un archivo adjunto al documento.
- addMetadata() : static
- Agrega una clave específica a los metadatos.
- getAttachments() : array<string|int, AttachmentInterface>
- Obtiene el listado de archivos adjuntos al documento.
- getContent() : string
- Obtiene el contenido del documento que se está intercambiando.
- getContentSize() : int
- Obtiene el tamaño del contenido en bytes.
- getID() : string
- Obtiene el identificador único del documento.
- getMetadata() : BagInterface
- Obtiene los metadatos del documento.
- getType() : DocumentType
- Obtiene el tipo del documento.
- setMetadata() : static
- Asigna los metadatos del documento.
Methods
addAttachment()
Agrega un archivo adjunto al documento.
public
addAttachment(AttachmentInterface $attachment) : static
Parameters
- $attachment : AttachmentInterface
Return values
staticaddMetadata()
Agrega una clave específica a los metadatos.
public
addMetadata(string $key, mixed $value) : static
Parameters
- $key : string
- $value : mixed
Return values
staticgetAttachments()
Obtiene el listado de archivos adjuntos al documento.
public
getAttachments() : array<string|int, AttachmentInterface>
Return values
array<string|int, AttachmentInterface>getContent()
Obtiene el contenido del documento que se está intercambiando.
public
getContent() : string
Típicamente será el XML de un documento tributario electrónico (DTE).
Return values
stringgetContentSize()
Obtiene el tamaño del contenido en bytes.
public
getContentSize() : int
Return values
intgetID()
Obtiene el identificador único del documento.
public
getID() : string
Return values
stringgetMetadata()
Obtiene los metadatos del documento.
public
getMetadata() : BagInterface
Estos son útiles para el proceso de intercambio y/o el medio de transporte usado para el intercambio.
Return values
BagInterfacegetType()
Obtiene el tipo del documento.
public
getType() : DocumentType
Return values
DocumentTypesetMetadata()
Asigna los metadatos del documento.
public
setMetadata(BagInterface|array<string|int, mixed> $metadata) : static
Parameters
- $metadata : BagInterface|array<string|int, mixed>