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

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

                break;
        }

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

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

                break;
        }

        return $contents;
    }
public function loadTemplate ( $ filename , $ format = null ) { $ contents = $ this -> getTemplateContent ( $ filename ) ; switch ( $ format ) { case 'json' : $ contents = json_decode ( $ contents , true ) ; break ; } return $ contents ; }
Load template file contents.

@param string $filename
The template filename.
@param string $format
The format to use to decode the contents.

@return string|array
The templates raw contents; if format was provided the decoded contents
is returned.
Load template file contents .