Свойство | Type | Description | |
---|---|---|---|
$client | GuzzleHttp\ClientInterface | ||
$config | Holds the current config instance. | ||
$endpoint | API endpoint | ||
$source | source language | ||
$target | target language |
Méthode | Description | |
---|---|---|
__construct ( Illuminate\Contracts\Foundation\Application $app, GuzzleHttp\ClientInterface $client ) | ||
setSource ( $source = null ) | ||
setTarget ( $target ) | ||
translate ( $text ) : string |
Méthode | Description | |
---|---|---|
getApiKey ( ) : string | Returns the api key from the configuration. | |
getSource ( ) : string | Returns the source language. | |
getTarget ( ) : string | Returns the target language. | |
parseResponse ( array $contents ) : mixed | Extract and decode the translation response. |
public __construct ( Illuminate\Contracts\Foundation\Application $app, GuzzleHttp\ClientInterface $client ) | ||
$app | Illuminate\Contracts\Foundation\Application | |
$client | GuzzleHttp\ClientInterface |
protected parseResponse ( array $contents ) : mixed | ||
$contents | array | |
Résultat | mixed |
protected ClientInterface,GuzzleHttp $client | ||
Résultat | GuzzleHttp\ClientInterface |