PHP Класс Stichoza\GoogleTranslate\Tokens\GoogleTokenGenerator

Thanks to @helen5106 and @tehmaestro and few other cool guys at https://github.com/Stichoza/google-translate-php/issues/32
Наследование: implements Stichoza\GoogleTranslate\Tokens\TokenProviderInterface
Показать файл Открыть проект

Открытые методы

Метод Описание
generateToken ( string $source, string $target, string $text ) : mixed Generate and return a token.

Приватные методы

Метод Описание
RL ( $a, $b ) : integer Process token data by applying multiple operations.
TKK ( ) : array
TL ( string $a ) : string Generate a valid Google Translate request token.
charCodeAt ( string $str, integer $index ) : null | number Get the Unicode of the character at the specified index in a string.
shr32 ( $x, $bits ) : number Crypto function.

Описание методов

generateToken() публичный Метод

Generate and return a token.
public generateToken ( string $source, string $target, string $text ) : mixed
$source string Source language
$target string Target language
$text string Text to translate
Результат mixed A token