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