Example #1
0
File: input.php Project: sagfw/base
 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));
 }
Example #2
0
 public function get_flashdata()
 {
     return sanitize_null_bytes($this->get('flashdata'));
 }