1 | <?php |
||
22 | class Tools |
||
23 | { |
||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | public $request; |
||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | public $response; |
||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $path; |
||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $der; |
||
40 | /** |
||
41 | * @var array |
||
42 | */ |
||
43 | protected $soapnamespaces = [ |
||
44 | 'xmlns:soapenv' => "http://schemas.xmlsoap.org/soap/envelope/", |
||
45 | 'xmlns:sped'=> "http://sped.fazenda.gov.br/" |
||
46 | ]; |
||
47 | /** |
||
48 | * @var Certificate |
||
49 | */ |
||
50 | protected $certificate; |
||
51 | /** |
||
52 | * @var int |
||
53 | */ |
||
54 | protected $tpAmb = 2; |
||
55 | /** |
||
56 | * @var string |
||
57 | */ |
||
58 | protected $verAplic; |
||
59 | /** |
||
60 | * @var string |
||
61 | */ |
||
62 | protected $eventoVersion; |
||
63 | /** |
||
64 | * @var string |
||
65 | */ |
||
66 | protected $cnpjDeclarante; |
||
67 | /** |
||
68 | * @var SoapInterface |
||
69 | */ |
||
70 | protected $soap; |
||
71 | /** |
||
72 | * @var \DateTime |
||
73 | */ |
||
74 | protected $date; |
||
75 | /** |
||
76 | * @var array |
||
77 | */ |
||
78 | protected $versions; |
||
79 | /** |
||
80 | * Constructor |
||
81 | * @param string $config |
||
82 | * @param Certificate $certificate |
||
83 | */ |
||
84 | public function __construct( |
||
107 | |||
108 | /** |
||
109 | * Load Soap Class |
||
110 | * @param SoapInterface $soap |
||
111 | */ |
||
112 | public function loadSoapClass(SoapInterface $soap) |
||
116 | |||
117 | /** |
||
118 | * Returns a string not subject to repetition indicating |
||
119 | * the year, month, day, hour, minute, and second |
||
120 | * This return is used to name the log files of the |
||
121 | * SOAP communications sent and returned |
||
122 | * @return string AAAMMDDHHMMSS |
||
123 | */ |
||
124 | protected function generateMark() |
||
128 | |||
129 | /** |
||
130 | * This method communicates with the webservice by sending the |
||
131 | * pre-mounted message to the designated URL |
||
132 | * @param string $body |
||
133 | * @param string $method |
||
134 | * @param string $url |
||
135 | * @return string |
||
136 | */ |
||
137 | protected function sendRequest($body, $method, $url) |
||
170 | |||
171 | /** |
||
172 | * Includes missing or unsupported properties in stdClass |
||
173 | * @param stdClass $std |
||
174 | * @param array $possible |
||
175 | * @return stdClass |
||
176 | */ |
||
177 | protected function equilizeParameters(stdClass $std, $possible) |
||
187 | } |
||
188 |