PHP 클래스 Arcanedev\Localization\Utilities\LocalesManager

저자: ARCANEDEV ([email protected])
상속: implements Arcanedev\Localization\Contracts\LocalesManagerInterface
파일 보기 프로젝트 열기: arcanedev/localization

보호된 프로퍼티들

프로퍼티 타입 설명
$currentLocale string Current locale.
$defaultLocale string Default locale.
$locales Arcanedev\Localization\Entities\LocaleCollection
$supportedLocales Arcanedev\Localization\Entities\LocaleCollection

공개 메소드들

메소드 설명
__construct ( Illuminate\Foundation\Application $app ) Create LocaleManager instance.
getAllLocales ( ) : Arcanedev\Localization\Entities\LocaleCollection Get all locales.
getCurrentLocale ( ) : string Returns current language.
getCurrentLocaleEntity ( ) : Arcanedev\Localization\Entities\Locale Get the current locale entity.
getCurrentOrDefaultLocale ( ) : string Get current or default locale.
getDefaultLocale ( ) : string Get the default locale.
getSupportedLocales ( ) : Arcanedev\Localization\Entities\LocaleCollection Get supported locales.
getSupportedLocalesKeys ( ) : array Get supported locales keys.
isDefaultLocaleHiddenInUrl ( ) : boolean Hide the default locale in URL ??
isDefaultLocaleSupported ( $defaultLocale ) Check if default is supported.
isSupportedLocale ( string $locale ) : boolean Check if locale is supported.
setCurrentLocale ( string $currentLocale ) : self Set the current locale.
setDefaultLocale ( string $defaultLocale = null ) : self Set the default locale.
setLocale ( string | null $locale = null ) : string Set and return current locale.
setSupportedLocales ( array $supportedLocales ) : self Set supported locales.

비공개 메소드들

메소드 설명
config ( ) : Illuminate\Config\Repository Get config repository.
filterLocales ( array $supportedLocales ) : Arcanedev\Localization\Entities\LocaleCollection Filter locale collection.
getConfig ( string $name, mixed $default = null ) : mixed Get localization config.
load ( ) Load all locales data.
negotiateLocale ( ) : string Get negotiated locale.
request ( ) : Illuminate\Http\Request Get config repository.
updateRegional ( ) Update locale regional.
useAcceptLanguageHeader ( ) : boolean Returns the translation key for a given path.

메소드 상세

__construct() 공개 메소드

Create LocaleManager instance.
public __construct ( Illuminate\Foundation\Application $app )
$app Illuminate\Foundation\Application

getAllLocales() 공개 메소드

Get all locales.
public getAllLocales ( ) : Arcanedev\Localization\Entities\LocaleCollection
리턴 Arcanedev\Localization\Entities\LocaleCollection

getCurrentLocale() 공개 메소드

Returns current language.
public getCurrentLocale ( ) : string
리턴 string

getCurrentLocaleEntity() 공개 메소드

Get the current locale entity.
public getCurrentLocaleEntity ( ) : Arcanedev\Localization\Entities\Locale
리턴 Arcanedev\Localization\Entities\Locale

getCurrentOrDefaultLocale() 공개 메소드

Get current or default locale.

getDefaultLocale() 공개 메소드

Get the default locale.
public getDefaultLocale ( ) : string
리턴 string

getSupportedLocales() 공개 메소드

Get supported locales.
public getSupportedLocales ( ) : Arcanedev\Localization\Entities\LocaleCollection
리턴 Arcanedev\Localization\Entities\LocaleCollection

getSupportedLocalesKeys() 공개 메소드

Get supported locales keys.
public getSupportedLocalesKeys ( ) : array
리턴 array

isDefaultLocaleHiddenInUrl() 공개 메소드

Hide the default locale in URL ??

isDefaultLocaleSupported() 공개 메소드

Check if default is supported.
public isDefaultLocaleSupported ( $defaultLocale )

isSupportedLocale() 공개 메소드

Check if locale is supported.
public isSupportedLocale ( string $locale ) : boolean
$locale string
리턴 boolean

setCurrentLocale() 공개 메소드

Set the current locale.
public setCurrentLocale ( string $currentLocale ) : self
$currentLocale string
리턴 self

setDefaultLocale() 공개 메소드

Set the default locale.
public setDefaultLocale ( string $defaultLocale = null ) : self
$defaultLocale string
리턴 self

setLocale() 공개 메소드

Set and return current locale.
public setLocale ( string | null $locale = null ) : string
$locale string | null
리턴 string

setSupportedLocales() 공개 메소드

Set supported locales.
public setSupportedLocales ( array $supportedLocales ) : self
$supportedLocales array
리턴 self

프로퍼티 상세

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

Current locale.
protected string $currentLocale
리턴 string

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

Default locale.
protected string $defaultLocale
리턴 string

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

protected LocaleCollection,Arcanedev\Localization\Entities $locales
리턴 Arcanedev\Localization\Entities\LocaleCollection

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

protected LocaleCollection,Arcanedev\Localization\Entities $supportedLocales
리턴 Arcanedev\Localization\Entities\LocaleCollection