These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | use Aws\CloudWatch\CloudWatchClient; |
||
4 | |||
5 | function getCloudWatchClient($conf) |
||
6 | { |
||
7 | if (isset($conf->aws->profil)) { |
||
8 | return CloudWatchClient::factory(array( |
||
0 ignored issues
–
show
|
|||
9 | 'profil' => $conf->aws->profil, |
||
10 | 'region' => $conf->aws->region, |
||
11 | 'version' => '2010-08-01' |
||
12 | )); |
||
13 | } |
||
14 | return CloudWatchClient::factory(array( |
||
0 ignored issues
–
show
|
|||
15 | 'credentials' => array ( |
||
16 | 'key' => $conf->aws->key, |
||
17 | 'secret' => $conf->aws->secret |
||
18 | ), |
||
19 | 'region' => $conf->aws->region, |
||
20 | 'version' => '2010-08-01' |
||
21 | )); |
||
22 | } |
||
23 | |||
24 | function getConfigFile() |
||
25 | { |
||
26 | $longopts = array( |
||
27 | "required:" // Valeur requise |
||
28 | ); |
||
29 | if (array_key_exists('f', $args = getopt("f:", $longopts))) { |
||
30 | return json_decode(file_get_contents($args['f'])); |
||
31 | } |
||
32 | return json_decode(file_get_contents(APPLICATION_PATH.'/conf/config.json')); |
||
33 | } |
||
34 |
This method has been deprecated.