// ------------------------------------------------------------------------ /** * Helper Name * * @access public * @return void */ if ( ! function_exists('helper_name')) { function helper_name() { $CI = get_instance(); $controller = $this->CI->router->fetch_class(); $this->method = $this->CI->router->fetch_method(); // now you can search the directories for the controller name } }