1 | <?php |
||
21 | abstract class AbstractAdapter |
||
22 | { |
||
23 | use ParameterTrait; |
||
24 | |||
25 | /** |
||
26 | * Sandbox environment. |
||
27 | * |
||
28 | * @var bool |
||
29 | */ |
||
30 | protected $sandbox; |
||
31 | |||
32 | /** |
||
33 | * Constructor. |
||
34 | * |
||
35 | * @param array $parameters |
||
36 | * @param bool $sandbox |
||
37 | * |
||
38 | * @throws \Jgut\Tify\Exception\AdapterException |
||
39 | */ |
||
40 | public function __construct(array $parameters = [], $sandbox = false) |
||
58 | |||
59 | /** |
||
60 | * Retrieve if sandbox. |
||
61 | * |
||
62 | * @return bool |
||
63 | */ |
||
64 | public function isSandbox() |
||
68 | |||
69 | /** |
||
70 | * Set Sandbox. |
||
71 | * |
||
72 | * @param bool $sandbox |
||
73 | * |
||
74 | * @return $this |
||
75 | */ |
||
76 | public function setSandbox($sandbox) |
||
82 | |||
83 | /** |
||
84 | * Get the list of defined parameters. |
||
85 | * |
||
86 | * @return array |
||
87 | */ |
||
88 | protected function getDefinedParameters() |
||
92 | |||
93 | /** |
||
94 | * Get the list of default parameters. |
||
95 | * |
||
96 | * @return array |
||
97 | */ |
||
98 | protected function getDefaultParameters() |
||
102 | |||
103 | /** |
||
104 | * Get the list of required parameters. |
||
105 | * |
||
106 | * @return array |
||
107 | */ |
||
108 | protected function getRequiredParameters() |
||
112 | } |
||
113 |