AbstractBuilderStrategy
extends AbstractStrategy
in package
implements
BuilderStrategyInterface
AbstractYes
Clase abstracta (base) para las estrategias de construcción ("builders") de documentos tributarios.
Table of Contents
Interfaces
- BuilderStrategyInterface
- Interfaz base de las estrategias de construcción ("build") de documentos tributarios.
Properties
- $documentClass : string
- Clase del documento que este "builder" construirá.
- $normalizerWorker : NormalizerWorkerInterface
- $sanitizerWorker : SanitizerWorkerInterface
- $signatureService : SignatureServiceInterface
- $validatorWorker : ValidatorWorkerInterface
- $xmlService : XmlServiceInterface
Methods
- __construct() : mixed
- build() : DocumentInterface
- Construye el documento tributario con los datos pasados.
- create() : DocumentInterface
- Crea la instancia del DTE a partir del XmlDocument.
- sign() : void
- Firma un documento tributario.
- stamp() : void
- Timbra un documento tributario.
Properties
$documentClass
Clase del documento que este "builder" construirá.
protected
string
$documentClass
$normalizerWorker
private
NormalizerWorkerInterface
$normalizerWorker
$sanitizerWorker
private
SanitizerWorkerInterface
$sanitizerWorker
$signatureService
private
SignatureServiceInterface
$signatureService
$validatorWorker
private
ValidatorWorkerInterface
$validatorWorker
$xmlService
private
XmlServiceInterface
$xmlService
Methods
__construct()
public
__construct(NormalizerWorkerInterface $normalizerWorker, SanitizerWorkerInterface $sanitizerWorker, ValidatorWorkerInterface $validatorWorker, XmlServiceInterface $xmlService, SignatureServiceInterface $signatureService) : mixed
Parameters
- $normalizerWorker : NormalizerWorkerInterface
- $sanitizerWorker : SanitizerWorkerInterface
- $validatorWorker : ValidatorWorkerInterface
- $xmlService : XmlServiceInterface
- $signatureService : SignatureServiceInterface
build()
Construye el documento tributario con los datos pasados.
public
build(DocumentBagInterface $bag) : DocumentInterface
Parameters
- $bag : DocumentBagInterface
-
Contenedor con los datos del documento a construir.
Return values
DocumentInterfacecreate()
Crea la instancia del DTE a partir del XmlDocument.
public
create(XmlDocumentInterface $xmlDocument) : DocumentInterface
Parameters
- $xmlDocument : XmlDocumentInterface
Return values
DocumentInterfacesign()
Firma un documento tributario.
protected
sign(DocumentBagInterface $bag) : void
Parameters
- $bag : DocumentBagInterface
stamp()
Timbra un documento tributario.
protected
stamp(DocumentBagInterface $bag) : void
Parameters
- $bag : DocumentBagInterface