for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace RichanFongdasen\I18n;
class Locale
{
/**
* Country code.
*
* @var string
*/
protected $country;
* IETF Code.
protected $ietfCode;
* Language code.
protected $language;
* Locale name.
protected $name;
* Class constructor.
* @param string $name
* @param string $language
* @param string $country
public function __construct($name, $language, $country)
$this->country = strtoupper($country);
$this->language = strtolower($language);
$this->name = $name;
$this->ietfCode = $this->language.'-'.$this->country;
}
* Magic method to read data from inaccessible
* properties.
* @return string
public function __get($name)
return $this->{$name};
* Magic method to determine if a variable is set
* and is not NULL.
* @return bool
public function __isset($name)
return isset($this->{$name});