1 | <?php |
||
9 | class Consumer |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $key; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $secret; |
||
20 | |||
21 | /** |
||
22 | * Some API's need another key then secret for API requests |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $public; |
||
27 | |||
28 | /** |
||
29 | * @var string|null |
||
30 | */ |
||
31 | public $callback_url; |
||
32 | |||
33 | /** |
||
34 | * @param string $key |
||
35 | * @param string $secret |
||
36 | * @param string|null $callback_url |
||
37 | */ |
||
38 | 12 | public function __construct($key, $secret, $callback_url = null) |
|
44 | |||
45 | public function __toString() |
||
49 | |||
50 | /** |
||
51 | * @return string |
||
52 | */ |
||
53 | 4 | public function getKey() |
|
57 | |||
58 | /** |
||
59 | * @return string |
||
60 | */ |
||
61 | 3 | public function getSecret() |
|
65 | |||
66 | /** |
||
67 | * @return string |
||
68 | */ |
||
69 | public function getPublic() |
||
73 | |||
74 | /** |
||
75 | * @param string $public |
||
76 | */ |
||
77 | public function setPublic($public) |
||
81 | } |
||
82 |