for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SafeCrow;
/**
* Class Config
* @package SafeCrow
*/
class Config
{
* @var string
const URL_PROD = 'https://www.safecrow.ru';
const URL_DEV = 'https://dev.safecrow.ru';
private $key;
private $secret;
* @var bool
private $dev;
* @var array
private $headers;
* Config constructor.
* @param string $key
* @param string $secret
* @param bool $dev
public function __construct(string $key, string $secret, bool $dev = true)
$this->key = $key;
$this->secret = $secret;
$this->dev = $dev;
$this->headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json'
];
}
* @return string
public function getKey(): string
return $this->key;
public function getSecret(): string
return $this->secret;
* @return bool
public function isDev(): bool
return $this->dev;
public function getUrl(): string
return $this->isDev() ? self::URL_DEV : self::URL_PROD;
* @return array
public function getHeaders(): array
return $this->headers;