0 follower

Final Class Yiisoft\Yii\Middleware\Event\SetLocaleEvent

InheritanceYiisoft\Yii\Middleware\Event\SetLocaleEvent

Raised when {@see Locale} middleware have determined the locale to use.

Use this event to configure locale of extra services.

Public Methods

Hide inherited methods

Method Description Defined By
__construct() Yiisoft\Yii\Middleware\Event\SetLocaleEvent
getLocale() Get locale determined by {@see Locale} middleware. Yiisoft\Yii\Middleware\Event\SetLocaleEvent

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( string $locale )
$locale string

Locale determined by {@see \Yiisoft\Yii\Middleware\Locale} middleware.

                public function __construct(private readonly string $locale)
{
}

            
getLocale() public method

Get locale determined by {@see Locale} middleware.

public string getLocale ( )
return string

Locale to use.

                public function getLocale(): string
{
    return $this->locale;
}