PHP 클래스 MenaraSolutions\Geographer\Services\TranslationAgency

상속: implements MenaraSolutions\Geographer\Contracts\TranslationAgencyInterface
파일 보기 프로젝트 열기: menarasolutions/geographer

보호된 프로퍼티들

프로퍼티 타입 설명
$basePath string
$form string
$inflictsTo array
$languages array List of available translators
$prepositions boolean
$repository MenaraSolutions\Geographer\Contracts\RepositoryInterface
$translators PoliglottaInterface

공개 메소드들

메소드 설명
__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

메소드 상세

__construct() 공개 메소드

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

excludePrepositions() 공개 메소드

public excludePrepositions ( )

getRepository() 공개 메소드

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

getSupportedLanguages() 공개 메소드

public getSupportedLanguages ( ) : array
리턴 array

getTranslator() 공개 메소드

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

includePrepositions() 공개 메소드

public includePrepositions ( )

setForm() 공개 메소드

public setForm ( string $form )
$form string

setRepository() 공개 메소드

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

translate() 공개 메소드

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

프로퍼티 상세

$basePath 보호되어 있는 프로퍼티

protected string $basePath
리턴 string

$form 보호되어 있는 프로퍼티

protected string $form
리턴 string

$inflictsTo 보호되어 있는 프로퍼티

protected array $inflictsTo
리턴 array

$languages 보호되어 있는 프로퍼티

List of available translators
protected array $languages
리턴 array

$prepositions 보호되어 있는 프로퍼티

protected bool $prepositions
리턴 boolean

$repository 보호되어 있는 프로퍼티

protected RepositoryInterface,MenaraSolutions\Geographer\Contracts $repository
리턴 MenaraSolutions\Geographer\Contracts\RepositoryInterface

$translators 보호되어 있는 프로퍼티

PoliglottaInterface
protected $translators