private function checkTemplate($template)
    {
        if ( ! is_string($template)) {
            $type = gettype($template);
            throw new Exceptions\InvalidTypeException(
                "The default template name must be a string, $type given."
            );
        }

        $template = strtolower(trim($template));

        if ( ! array_key_exists($template, $this->supported)) {
            throw new Exceptions\InvalidTemplateException(
                "The template [$template] is not supported."
            );
        }
    }