public function getByName(string $role): ?IRole
    {
        if (null === $this->roles) {
            $this->getAll();
        }

        if (!isset($this->names[$role])) {
            return null;
        }

        return $this->roles[$this->names[$role]];
    }