public function addTemplate($hookCode, $value)
    {
        if (array_key_exists($hookCode, $this->templates)) {
            throw new \InvalidArgumentException(sprintf("The hook '%s' is already used in this class.", $hookCode));
        }

        $this->templates[$hookCode] = $value;
    }