PHP Class BenConstable\Localize\Determiners\Header

Inheritance: extends Determiner
Show file Open project: benconstable/laravel-localize-middleware Class Usage Examples

Public Methods

Method Description
__construct ( string $header ) : void Constructor.
determineLocale ( Illuminate\Http\Request $request ) : string Determine the locale from the request parameters.

Method Details

__construct() public method

Constructor.
public __construct ( string $header ) : void
$header string Name of the header that holds the locale
return void

determineLocale() public method

Determine the locale from the request parameters.
public determineLocale ( Illuminate\Http\Request $request ) : string
$request Illuminate\Http\Request
return string