PHP Class Arcanedev\Localization\Bases\Middleware

Author: ARCANEDEV ([email protected])
Inheritance: extends Arcanedev\Support\Bases\Middleware
Afficher le fichier Open project: arcanedev/localization

Méthodes publiques

Méthode Description
getCurrentLocale ( ) : string Get the current locale.
getDefaultLocale ( ) : string Get the default locale.
getSupportedLocales ( ) : Arcanedev\Localization\Entities\LocaleCollection Return an array of all supported Locales.

Méthodes protégées

Méthode Description
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.

Method Details

getCurrentLocale() public méthode

Get the current locale.
public getCurrentLocale ( ) : string
Résultat string

getDefaultLocale() public méthode

Get the default locale.
public getDefaultLocale ( ) : string
Résultat string

getLocalizedRedirect() protected méthode

Get the redirection response.
protected getLocalizedRedirect ( string $locale ) : Illuminate\Http\RedirectResponse | null
$locale string
Résultat Illuminate\Http\RedirectResponse | null

getSupportedLocales() public méthode

Return an array of all supported Locales.
public getSupportedLocales ( ) : Arcanedev\Localization\Entities\LocaleCollection
Résultat Arcanedev\Localization\Entities\LocaleCollection

hideDefaultLocaleInURL() protected méthode

Hide the default locale in URL ??
protected hideDefaultLocaleInURL ( ) : boolean
Résultat boolean

isDefaultLocaleHidden() protected méthode

Check is default locale hidden.
protected isDefaultLocaleHidden ( string | null $locale ) : boolean
$locale string | null
Résultat boolean

makeRedirectResponse() protected méthode

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