1 | <?php |
||
9 | abstract class AbstractDriver implements PacDriverInterface |
||
10 | { |
||
11 | /** |
||
12 | * The driver username. |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $username; |
||
17 | /** |
||
18 | * The driver password. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $password; |
||
23 | /** |
||
24 | * The driver sandbox. |
||
25 | * |
||
26 | * @var bool |
||
27 | */ |
||
28 | protected $sandbox; |
||
29 | /** |
||
30 | * The custom parameters to be sent with the request. |
||
31 | * |
||
32 | * @var array |
||
33 | */ |
||
34 | protected $parameters = []; |
||
35 | /** |
||
36 | * The Guzzle Soap Factory. |
||
37 | * |
||
38 | * @var \Meng\AsyncSoap\Guzzle\Factory |
||
39 | */ |
||
40 | protected $factory; |
||
41 | |||
42 | /** |
||
43 | * Create a new driver instance. |
||
44 | * |
||
45 | * @param string $username |
||
46 | * @param string $password |
||
47 | * @param bool $sandbox |
||
48 | */ |
||
49 | public function __construct($username, $password, $sandbox = true) |
||
56 | |||
57 | abstract public function stamp(); |
||
58 | |||
59 | abstract public function cancel(); |
||
60 | |||
61 | abstract public function addUser($rfc, $params = []); |
||
62 | |||
63 | abstract public function editUser($rfc, $params = []); |
||
64 | |||
65 | abstract public function getUsers(); |
||
66 | |||
67 | abstract public function getUser($rfc = null); |
||
68 | |||
69 | abstract public function assignStamps($rfc = null, $credit = 0); |
||
70 | |||
71 | abstract protected function url($wsdl = null); |
||
72 | |||
73 | public function request($url = null, $method = null, $params = []) |
||
86 | |||
87 | public function xml() |
||
91 | |||
92 | public function user() |
||
96 | } |
||
97 |