public function exec(string $name)
    {
        if (isset($this->hooks[$name]) === false) {
            $this->logger->debug(
                "No hook definitions found for '{$name}'. Available hook "
                . "definitions",
                [array_keys($this->hooks)]
            );
            return null;
        }

        $return = [];
        $params = array_merge($this->params, array_slice(func_get_args(), 1));
        foreach ($this->hooks[$name] as $definition) {
            if ($this->stop === true) {
                $this->stop = false;
                $this->logger->info(
                    "Hook execution was interrupted for hook '{$name}'"
                );
                break;
            }

            $this->logger->info("Calling definition for hook '{$name}'");
            $this->logger->debug("Hook definition parameters", $params);
            $retVal = $definition(...$params);
            if ($retVal !== null) {
                $return[] = $retVal;
            }
        }

        return count($return) === 1 ? $return[0] : $return;
    }