Welcome Guest, Not a member yet? Register   Sign In
Load Language from within an own Library
#4

[eluser]cahva[/eluser]
If thats the whole code, yoy forgot to use get_instance() so that you can use CI libraries. This can be found in the user guide

For example:
Code:
class Displayerror
{
    function Displayerror()
    {
        $this->CI =& get_instance();
    }
    
    function raiseError( $message = '' )
    {
        $return = '';
        if( empty( $message ) ) $message = $this->CI->lang->line( 'error_undefined' );
        $return .= "\n".'<div class="error">'."\n";
        $return .= "\t".'<div class="message"><h1>Error</h1><span>'.$message.'</span></div>'."\n";
        $return .= '</div>'."\n";
        return $return;
    }
    
}


Messages In This Thread
Load Language from within an own Library - by El Forum - 11-01-2009, 12:30 PM
Load Language from within an own Library - by El Forum - 11-01-2009, 02:43 PM
Load Language from within an own Library - by El Forum - 11-02-2009, 02:29 AM
Load Language from within an own Library - by El Forum - 11-02-2009, 06:58 AM
Load Language from within an own Library - by El Forum - 11-02-2009, 07:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB