for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Sokil\IsoCodes\Database\Languages;
use Sokil\IsoCodes\Database\Languages;
class Language
{
/**
* @var string
*/
private $name;
private $localName;
private $alpha3;
private $scope;
private $type;
private $invertedName;
private $alpha2;
* @param string $name
* @param string $alpha3
* @param string $scope
* @param string $type
* @param string|null $invertedName
* @param string|null $alpha2
public function __construct(
$name,
$alpha3,
$scope,
$type,
$invertedName = null,
$alpha2 = null
) {
$this->name = $name;
$this->alpha3 = $alpha3;
$this->scope = $scope;
$this->type = $type;
$this->invertedName = $invertedName;
$this->alpha2 = $alpha2;
}
* @return string
public function getName()
return $this->name;
public function getLocalName()
if ($this->localName === null) {
$this->localName = dgettext(
Languages::getISONumber(),
$this->name
);
return $this->localName;
public function getAlpha3()
return $this->alpha3;
public function getScope()
return $this->scope;
public function getType()
return $this->type;
* @return string|null
public function getInvertedName()
return $this->invertedName;
public function getAlpha2()
return $this->alpha2;