프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$client | GuzzleHttp\ClientInterface | ||
$config | Holds the current config instance. | ||
$endpoint | API endpoint | ||
$source | source language | ||
$target | target language |
메소드 | 설명 | |
---|---|---|
__construct ( Illuminate\Contracts\Foundation\Application $app, GuzzleHttp\ClientInterface $client ) | ||
setSource ( $source = null ) | ||
setTarget ( $target ) | ||
translate ( $text ) : string |
메소드 | 설명 | |
---|---|---|
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 | |
리턴 | mixed |