function session($key = NULL, $session = NULL) { if ($session === NULL) { $session = $_SESSION; } if (is_array($key) && count($key) > 0) { $k = array_shift($key); if (!isset($session[$k])) { return NULL; } return session($key, $session[$k]); } return sanitize_null_bytes(($key === NULL or $key === []) ? $session : (isset($session[$key]) ? $session[$key] : NULL)); }
public function get_flashdata() { return sanitize_null_bytes($this->get('flashdata')); }