public function model($model, $params = array(), $method_name = "", $data = array())
    {
        //Check if this model has been included

        if (!isset($this->_loaded_models[$model])) {

            $file = configItem('site')['modeldir'] . implode('/', explode('-', $model)) . '.php';

            $class = basename($file, '.php');

            if (!file_exists($file)) {

                $this->logger->error("The model $file was not found");

            } else {

                $this->_loaded_models[$model] = $class;
            }
        }else{
            $class = $this->_loaded_models[$model];
        }
        $this->loading[] = 'model';
        return $this->_createInstance('application\model\\', $class, $params, $method_name, $data);
    }