1 | <?php |
||
20 | class FeFactory implements FactoryInterface |
||
21 | { |
||
22 | /** |
||
23 | * @var SignedXml |
||
24 | */ |
||
25 | private $signer; |
||
26 | |||
27 | /** |
||
28 | * Sender service. |
||
29 | * |
||
30 | * @var SenderInterface |
||
31 | */ |
||
32 | private $sender; |
||
33 | |||
34 | /** |
||
35 | * Ultimo xml generado. |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | private $lastXml; |
||
40 | |||
41 | /** |
||
42 | * Xml Builder. |
||
43 | * |
||
44 | * @var BuilderInterface |
||
45 | */ |
||
46 | private $builder; |
||
47 | |||
48 | /** |
||
49 | * Get document builder. |
||
50 | * |
||
51 | * @return BuilderInterface |
||
52 | */ |
||
53 | 2 | public function getBuilder() |
|
57 | |||
58 | /** |
||
59 | * Get sender service. |
||
60 | * |
||
61 | * @return SenderInterface |
||
62 | */ |
||
63 | 2 | public function getSender() |
|
67 | |||
68 | /** |
||
69 | * Set sender service. |
||
70 | * |
||
71 | * @param SenderInterface $sender |
||
72 | * |
||
73 | * @return FeFactory |
||
74 | */ |
||
75 | 56 | public function setSender($sender) |
|
81 | |||
82 | /** |
||
83 | * Set document builder. |
||
84 | * |
||
85 | * @param BuilderInterface $builder |
||
86 | * |
||
87 | * @return FeFactory |
||
88 | */ |
||
89 | 70 | public function setBuilder($builder) |
|
95 | |||
96 | /** |
||
97 | * @return SignedXml |
||
98 | */ |
||
99 | 2 | public function getSigner() |
|
103 | |||
104 | /** |
||
105 | * @param SignedXml $signer |
||
106 | * |
||
107 | * @return FeFactory |
||
108 | */ |
||
109 | 80 | public function setSigner($signer) |
|
115 | |||
116 | /** |
||
117 | * Build and send document. |
||
118 | * |
||
119 | * @param DocumentInterface $document |
||
120 | * |
||
121 | * @return BaseResult |
||
122 | */ |
||
123 | 54 | public function send(DocumentInterface $document) |
|
129 | |||
130 | |||
131 | 2 | public function sendXml($name, $xml) |
|
135 | |||
136 | /** |
||
137 | * Get Last XML Signed. |
||
138 | * |
||
139 | * @return string |
||
140 | */ |
||
141 | 12 | public function getLastXml() |
|
145 | |||
146 | /** |
||
147 | * @param DocumentInterface $document |
||
148 | * |
||
149 | * @return string |
||
150 | */ |
||
151 | 70 | public function getXmlSigned(DocumentInterface $document) |
|
159 | } |
||
160 |