CI_Session::__get()

__get($key)

Parameters:
  • $key (string) – Session item key
Returns:

The requested session data item, or NULL if it doesn’t exist

Return type:

mixed

A magic method that allows you to use $this->session->item instead of $_SESSION['item'], if that’s what you prefer.

It will also return the session ID by calling session_id() if you try to access $this->session->session_id.

doc_CodeIgniter
2016-10-15 16:31:55
Comments
Leave a Comment

Please login to continue.