| 1 | <?php |
||
| 9 | class NegotiateLanguage |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * I18n service instance. |
||
| 13 | * |
||
| 14 | * @var I18nService |
||
| 15 | */ |
||
| 16 | protected $i18n; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * NegotiateLanguage constructor. |
||
| 20 | * |
||
| 21 | * @param I18nService $i18n |
||
| 22 | */ |
||
| 23 | public function __construct(I18nService $i18n) |
||
| 24 | { |
||
| 25 | $this->i18n = $i18n; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Handle an incoming request. |
||
| 30 | * |
||
| 31 | * @param \Illuminate\Http\Request $request |
||
| 32 | * @param \Closure $next |
||
| 33 | * |
||
| 34 | * @throws \RichanFongdasen\I18n\Exceptions\InvalidLocaleException |
||
| 35 | * @throws \RichanFongdasen\I18n\Exceptions\InvalidFallbackLanguageException |
||
| 36 | * |
||
| 37 | * @return mixed |
||
| 38 | */ |
||
| 39 | public function handle(Request $request, Closure $next) |
||
| 50 | } |
||
| 51 |