for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Yiisoft\View\State;
/**
* @internal
*/
final class LocaleState
{
private string $language;
public function __construct(string $language = 'en')
$this->language = $language;
}
* Set the specified language code.
*
* @param string $language The language code.
* @return static
public function setLanguage(string $language): self
return $this;
* Gets the language code.
* @return string The language code.
public function getLanguage(): string
return $this->language;
public function __toString(): string
return $this->getLanguage();