<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}

class Parser_dev_view
{

    public function __construct()
    {
        if (ENVIRONMENT !== 'development') {
            show_error($this->lang->line('Parser works only in development mode'));
        }
    }

    public function parse($file = "")
    {
        $ci = get_instance();
        $ci->load->model('ciext/core_model');

        return $ci->core_model->get_modules($ci->load->library('ciext/parser/ciext_parser')->parse($ci->load->view($file, [], true)));
    }

}
