File tree 5 files changed +10
-13
lines changed
5 files changed +10
-13
lines changed Original file line number Diff line number Diff line change 2
2
.php_cs.cache
3
3
.idea
4
4
composer.lock
5
+ .hf-api-client-secrets.php
Load Diff This file was deleted.
File renamed without changes.
Original file line number Diff line number Diff line change 14
14
15
15
foreach ($ autoloadFiles as $ autoloadFile ) {
16
16
if (file_exists ($ autoloadFile )) {
17
+ chdir (dirname ($ autoloadFile ) . '/.. ' );
17
18
require_once $ autoloadFile ;
18
19
}
19
20
}
22
23
use HF \ApiClient \Options \Options ;
23
24
use Zend \Cache \StorageFactory ;
24
25
25
- if (! file_exists (__DIR__ . '/conf.php ' )) {
26
- print 'copy example/conf.php.dist to example/conf.php ' ;
27
-
28
- die ();
26
+ if (! file_exists ('.hf-api-client-secrets.php ' )) {
27
+ die ('copy example/.hf-api-client-secrets.php.dist to APP_ROOT/.hf-api-client-secrets.php ' );
29
28
}
30
29
31
30
// optional but will then use filesystem default tmp directory
39
38
'plugins ' => ['serializer ' ],
40
39
]);
41
40
42
- $ options = Options::fromArray (include (__DIR__ . ' /conf .php ' ));
41
+ $ options = Options::fromArray (include (' .hf-api-client-secrets .php ' ));
43
42
44
43
$ api = ApiClient::createClient ($ options , $ cache );
45
44
Original file line number Diff line number Diff line change 10
10
__DIR__ . '/vendor/autoload.php ' ,
11
11
];
12
12
13
- chdir (__DIR__ . '/.. ' );
14
-
15
13
foreach ($ autoloadFiles as $ autoloadFile ) {
16
14
if (file_exists ($ autoloadFile )) {
15
+ chdir (dirname ($ autoloadFile ) . '/.. ' );
17
16
require_once $ autoloadFile ;
18
17
}
19
18
}
20
19
20
+
21
21
use HF \ApiClient \ApiClient ;
22
22
use HF \ApiClient \Options \Options ;
23
23
use Zend \Cache \StorageFactory ;
24
24
25
- if (! file_exists (__DIR__ . '/conf.php ' )) {
26
- print 'copy example/conf.php.dist to example/conf.php ' ;
27
-
28
- die ();
25
+ if (! file_exists ('.hf-api-client-secrets.php ' )) {
26
+ die ('copy example/.hf-api-client-secrets.php.dist to APP_ROOT/.hf-api-client-secrets.php ' );
29
27
}
30
28
31
29
// optional but will then use filesystem default tmp directory
39
37
'plugins ' => ['serializer ' ],
40
38
]);
41
39
42
- $ options = Options::fromArray (include (__DIR__ . ' /conf .php ' ));
40
+ $ options = Options::fromArray (include (' .hf-api-client-secrets .php ' ));
43
41
44
42
$ api = ApiClient::createClient ($ options , $ cache );
45
43
You can’t perform that action at this time.
0 commit comments