for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace AbterPhp\Admin\Domain\Entities;
use AbterPhp\Framework\Domain\Entities\IStringerEntity;
class UserLanguage implements IStringerEntity
{
/** @var string */
protected $id;
protected $identifier;
protected $name;
/**
* Page constructor.
*
* @param string $id
* @param string $identifier
* @param string $name
*/
public function __construct(string $id, string $identifier, string $name)
$this->id = $id;
$this->identifier = $identifier;
$this->name = $name;
}
* @return string
public function getId()
return $this->id;
public function setId($id)
public function getIdentifier(): string
return $this->identifier;
* @return $this
public function setIdentifier(string $identifier): UserLanguage
return $this;
public function getName(): string
return $this->name;
public function setName(string $name): UserLanguage
public function __toString(): string
return $this->getIdentifier();
public function toJSON(): string
return json_encode(
[
"id" => $this->getId(),
"identifier" => $this->getIdentifier(),
"name" => $this->getName(),
]
);