PHP 클래스 Arcanedev\Localization\Bases\Middleware

저자: ARCANEDEV ([email protected])
상속: extends Arcanedev\Support\Bases\Middleware
파일 보기 프로젝트 열기: arcanedev/localization

공개 메소드들

메소드 설명
getCurrentLocale ( ) : string Get the current locale.
getDefaultLocale ( ) : string Get the default locale.
getSupportedLocales ( ) : Arcanedev\Localization\Entities\LocaleCollection Return an array of all supported Locales.

보호된 메소드들

메소드 설명
getLocalizedRedirect ( string $locale ) : Illuminate\Http\RedirectResponse | null Get the redirection response.
hideDefaultLocaleInURL ( ) : boolean Hide the default locale in URL ??
isDefaultLocaleHidden ( string | null $locale ) : boolean Check is default locale hidden.
makeRedirectResponse ( string $url, integer $code = 302 ) : Illuminate\Http\RedirectResponse Make a redirect response.

메소드 상세

getCurrentLocale() 공개 메소드

Get the current locale.
public getCurrentLocale ( ) : string
리턴 string

getDefaultLocale() 공개 메소드

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

getLocalizedRedirect() 보호된 메소드

Get the redirection response.
protected getLocalizedRedirect ( string $locale ) : Illuminate\Http\RedirectResponse | null
$locale string
리턴 Illuminate\Http\RedirectResponse | null

getSupportedLocales() 공개 메소드

Return an array of all supported Locales.
public getSupportedLocales ( ) : Arcanedev\Localization\Entities\LocaleCollection
리턴 Arcanedev\Localization\Entities\LocaleCollection

hideDefaultLocaleInURL() 보호된 메소드

Hide the default locale in URL ??
protected hideDefaultLocaleInURL ( ) : boolean
리턴 boolean

isDefaultLocaleHidden() 보호된 메소드

Check is default locale hidden.
protected isDefaultLocaleHidden ( string | null $locale ) : boolean
$locale string | null
리턴 boolean

makeRedirectResponse() 보호된 메소드

Make a redirect response.
protected makeRedirectResponse ( string $url, integer $code = 302 ) : Illuminate\Http\RedirectResponse
$url string
$code integer
리턴 Illuminate\Http\RedirectResponse