public function loadTemplate($filename, $format = null)
    {
        $contents = $this->getTemplateContent($filename);

        switch ($format) {
            case 'json':
                $contents = json_decode($contents, true);

                break;
        }

        return $contents;
    }