| 1 | <?php |
||
| 9 | class Config |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | const URL_PROD = 'https://www.safecrow.ru'; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | const URL_DEV = 'https://dev.safecrow.ru'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | private $key; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | private $secret; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var bool |
||
| 33 | */ |
||
| 34 | private $dev; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @var array |
||
| 38 | */ |
||
| 39 | private $headers; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Config constructor. |
||
| 43 | * @param string $key |
||
| 44 | * @param string $secret |
||
| 45 | * @param bool $dev |
||
| 46 | */ |
||
| 47 | public function __construct(string $key, string $secret, bool $dev = true) |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | public function getKey(): string |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @return string |
||
| 68 | */ |
||
| 69 | public function getSecret(): string |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return bool |
||
| 76 | */ |
||
| 77 | public function isDev(): bool |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @return string |
||
| 84 | */ |
||
| 85 | public function getUrl(): string |
||
| 89 | |||
| 90 | /** |
||
| 91 | * @return array |
||
| 92 | */ |
||
| 93 | public function getHeaders(): array |
||
| 97 | } |
||
| 98 |