Welcome Guest, Not a member yet? Register   Sign In
What's the connection between the $CI object and cache file?
#1

So I have this piece of code and I've been wondering what's the relationship between the $CI object and the cache file.
This is the code form the Output class, line 449.


PHP Code:
// Does the $CI object exist?
        // If not we know we are dealing with a cache file so we'll
        // simply echo out the data and exit.
        
if ( ! isset($CI))
        {
            echo 
$output 
             
            log_message
('debug'"Final output sent to browser");
            
log_message('debug'"Total execution time: ".$elapsed);
            return 
TRUE;
        } 

What I'm also confused about is how can the $CI object  possibly not be loaded?

Which are those cases?

And as a last thing(as if it wasn't enough), how can the $CI object influence the cache file, or vice versa?


I hope that all my questions are understandable.
Any help will be much appreciated.
Reply
#2

$CI is the CodeIgniter Super Object, it's an instance of CodeIgniter.

SEE: The CodeIgniter Users Guide.

Utilizing CodeIgniter Resources within Your Library
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(07-01-2018, 03:51 AM)InsiteFX Wrote: $CI is the CodeIgniter Super Object, it's an instance of CodeIgniter.

More specifically, it is an instance of the current controller.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB