0 follower

Final Class Yiisoft\View\State\LocaleState

InheritanceYiisoft\View\State\LocaleState

Public Methods

Hide inherited methods

Method Description Defined By
__construct() Yiisoft\View\State\LocaleState
getLocale() Gets the locale code. Yiisoft\View\State\LocaleState
setLocale() Set the specified locale code. Yiisoft\View\State\LocaleState

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( string $locale 'en' )
$locale string

                public function __construct(
    private string $locale = 'en'
) {
}

            
getLocale() public method

Gets the locale code.

public string getLocale ( )
return string

The locale code.

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

            
setLocale() public method

Set the specified locale code.

public self setLocale ( string $locale )
$locale string

The locale code.

                public function setLocale(string $locale): self
{
    $this->locale = $locale;
    return $this;
}