PHP Class Potsky\LaravelLocalizationHelpers\Factory\Translator

Inheritance: implements Potsky\LaravelLocalizationHelpers\Factory\TranslatorInterface
Afficher le fichier Open project: potsky/laravel-localization-helpers Class Usage Examples

Protected Properties

Свойство Type Description
$translator Potsky\LaravelLocalizationHelpers\Factory\TranslatorInterface

Méthodes publiques

Méthode Description
__construct ( string $translator, array $config = [] )
getTranslator ( ) : Potsky\LaravelLocalizationHelpers\Factory\TranslatorInterface Return the used translator
translate ( $word, $toLang, $fromLang = null )

Method Details

__construct() public méthode

public __construct ( string $translator, array $config = [] )
$translator string The translation service name
$config array The configuration array for the translation service

getTranslator() public méthode

Return the used translator
public getTranslator ( ) : Potsky\LaravelLocalizationHelpers\Factory\TranslatorInterface
Résultat Potsky\LaravelLocalizationHelpers\Factory\TranslatorInterface

translate() public méthode

public translate ( $word, $toLang, $fromLang = null )

Property Details

$translator protected_oe property

protected TranslatorInterface,Potsky\LaravelLocalizationHelpers\Factory $translator
Résultat Potsky\LaravelLocalizationHelpers\Factory\TranslatorInterface