-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ea1379
commit bb68f07
Showing
3 changed files
with
24 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,35 @@ | ||
|
||
<?php | ||
|
||
Class ZiggeoConfig { | ||
|
||
public $config; | ||
|
||
function __construct() { | ||
$this->config = array( | ||
"regions" => array( | ||
"r1" => "https://srvapi-eu-west-1.ziggeo.com" | ||
), | ||
"server_api_url" => "https://srvapi.ziggeo.com", | ||
"api_regions" => array( | ||
"r1" => "https://api-eu-west-1.ziggeo.com" | ||
), | ||
"api_url" => "https://api-us-east-1.ziggeo.com", | ||
"request_timeout" => 60, | ||
"resilience_factor" => 5, | ||
//change this to represent code that returns if your server does not reach our server for some reason even after few attempts. Can be any valid code that your code can look out for. | ||
"resilience_onfail" => array( | ||
"error" => true | ||
), | ||
|
||
public $config; | ||
|
||
function __construct() { | ||
$this->config = array( | ||
"regions" => array("r1" => "https://srvapi-eu-west-1.ziggeo.com", ), | ||
"server_api_url" => "https://srvapi.ziggeo.com", | ||
"api_regions" => array("r1" => "https://api-eu-west-1.ziggeo.com", ), | ||
"api_url" => "https://api-us-east-1.ziggeo.com", | ||
"request_timeout" => 60, | ||
"resilience_factor" => 5, | ||
"resilience_onfail" => [ "error" => true ], //change this to represent code that returns if your server does not reach our server for some reason even after few attempts. Can be any valid code that your code can look out for. | ||
//In general you do not need that info, just useful for any debugging | ||
"info" => array( | ||
"progress_show" => true, | ||
"progress_show" => false, | ||
"progress_multiplier" => 1048576, //1 for bytes, 1024 for kb, 1048576 for mb, 1073741824 for gb | ||
"progress_desc" => 'mb' //mb per above | ||
) | ||
); | ||
} | ||
function get($ident) { | ||
return $this->config[$ident]; | ||
} | ||
); | ||
} | ||
function get($ident) { | ||
return $this->config[$ident]; | ||
} | ||
|
||
function set($ident, $value) { | ||
$this->config[$ident] = $value; | ||
return $this; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters