PHP Class MenaraSolutions\Geographer\Services\TranslationAgency

Inheritance: implements MenaraSolutions\Geographer\Contracts\TranslationAgencyInterface
Exibir arquivo Open project: menarasolutions/geographer

Protected Properties

Property Type Description
$basePath string
$form string
$inflictsTo array
$languages array List of available translators
$prepositions boolean
$repository MenaraSolutions\Geographer\Contracts\RepositoryInterface
$translators PoliglottaInterface

Public Methods

Method Description
__construct ( string $basePath, MenaraSolutions\Geographer\Contracts\RepositoryInterface $repository ) TranslationRepository constructor.
excludePrepositions ( )
getRepository ( ) : MenaraSolutions\Geographer\Contracts\RepositoryInterface
getSupportedLanguages ( ) : array
getTranslator ( string $language ) : MenaraSolutions\Geographer\Contracts\PoliglottaInterface
includePrepositions ( )
setForm ( string $form )
setRepository ( MenaraSolutions\Geographer\Contracts\RepositoryInterface $repository ) : MenaraSolutions\Geographer\Contracts\TranslationAgencyInterface
translate ( MenaraSolutions\Geographer\Contracts\IdentifiableInterface $subject, string $language = 'en' ) : string

Method Details

__construct() public method

TranslationRepository constructor.
public __construct ( string $basePath, MenaraSolutions\Geographer\Contracts\RepositoryInterface $repository )
$basePath string
$repository MenaraSolutions\Geographer\Contracts\RepositoryInterface

excludePrepositions() public method

public excludePrepositions ( )

getRepository() public method

public getRepository ( ) : MenaraSolutions\Geographer\Contracts\RepositoryInterface
return MenaraSolutions\Geographer\Contracts\RepositoryInterface $repository

getSupportedLanguages() public method

public getSupportedLanguages ( ) : array
return array

getTranslator() public method

public getTranslator ( string $language ) : MenaraSolutions\Geographer\Contracts\PoliglottaInterface
$language string
return MenaraSolutions\Geographer\Contracts\PoliglottaInterface

includePrepositions() public method

public includePrepositions ( )

setForm() public method

public setForm ( string $form )
$form string

setRepository() public method

public setRepository ( MenaraSolutions\Geographer\Contracts\RepositoryInterface $repository ) : MenaraSolutions\Geographer\Contracts\TranslationAgencyInterface
$repository MenaraSolutions\Geographer\Contracts\RepositoryInterface
return MenaraSolutions\Geographer\Contracts\TranslationAgencyInterface

translate() public method

public translate ( MenaraSolutions\Geographer\Contracts\IdentifiableInterface $subject, string $language = 'en' ) : string
$subject MenaraSolutions\Geographer\Contracts\IdentifiableInterface
$language string
return string

Property Details

$basePath protected_oe property

protected string $basePath
return string

$form protected_oe property

protected string $form
return string

$inflictsTo protected_oe property

protected array $inflictsTo
return array

$languages protected_oe property

List of available translators
protected array $languages
return array

$prepositions protected_oe property

protected bool $prepositions
return boolean

$repository protected_oe property

protected RepositoryInterface,MenaraSolutions\Geographer\Contracts $repository
return MenaraSolutions\Geographer\Contracts\RepositoryInterface

$translators protected_oe property

PoliglottaInterface
protected $translators