Welcome Guest, Not a member yet? Register   Sign In
Access to model functions throught custom library
#3

Or you can add this method to a CodeIgniter helper .

PHP Code:
/**
 * ci ()
 *
 * Place in any _helper file and load it.
 * 
 * The CodeIgniter Super Object
 */
if ( ! function_exists('ci'))
{
    
/**
     * ci ()
     * -------------------------------------------------------------------
     *
     * Example: ci()->class->method();
     * 
     * @return CI_Controller
     */
    
function ci()
    {
        return 
get_instance();
    }

What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: Access to model functions throught custom library - by InsiteFX - 01-20-2018, 05:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB