public function controller($controller, $params = array(), $method_name = "", $data = array())
    {
        $file = configItem('site')['cust_controller_dir'] . $controller . '.php';


        //base filename of the controller
        $class = basename($file, '.php');

        //Get the namespace
        $ns = $this->get_ns($file,$this->app_folder);

        //Check if this controller has been included
        if (!isset($this->_loaded_controllers[$controller])) {

            if (!file_exists($file)) {

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

            } else {

                $this->_loaded_controllers[$controller] = $class;
            }
        }else{
            $class = $this->_loaded_controllers[$controller];
        }
        $this->loading[] = 'controller';
        $method_name = str_replace('-', '', lcfirst(ucwords($method_name, '-')));
        return $this->_createInstance($ns, $class, $params, $method_name, $data);
    }