public function getByName(string $name): ?IPermission
    {
        if ($this->permissions === null) {
            $this->getAll();
        }

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

        return $this->permissions[$this->names[$name]];
    }