protected function setViewType($extension)
    {
        foreach ($this->renderers as $type => $config) {
            if (in_array($extension, $config['extensions'])) {
                $this->view_type = $type;
            }
        }
        if (!isset($this->view_type)) {
            $this->view_type = $this->default_view_type;
        }
    }