Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
18 | public function __construct( |
||
19 | string $projectId, |
||
20 | string $credentialsFilePath, |
||
21 | string $languageFrom, |
||
22 | string $languageTo |
||
23 | ) { |
||
24 | $this->projectId = $projectId; |
||
25 | $this->languageFrom = $languageFrom; |
||
26 | $this->languageTo = $languageTo; |
||
27 | |||
28 | // google credentials |
||
29 | putenv('GOOGLE_APPLICATION_CREDENTIALS=' . $credentialsFilePath); |
||
30 | |||
31 | // cannot use service - before create must be authorized google credentials |
||
32 | $this->translationServiceClient = new TranslationServiceClient(); |
||
33 | } |
||
54 |