Created
February 22, 2012 16:26
-
-
Save mikedfunk/1885876 to your computer and use it in GitHub Desktop.
adds all_flashdata to session class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* MY_Session | |
* | |
* Adds all_flashdata | |
* | |
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 | |
* @author Mike Funk | |
* @link http://mikefunk.com | |
* @email mike@mikefunk.com | |
* | |
* @file MY_Session.php | |
* @version 1.0 | |
* @date 02/22/2012 | |
* | |
* Copyright (c) 2012 | |
*/ | |
// -------------------------------------------------------------------------- | |
/** | |
* MY_Session class. | |
* | |
* @extends CI_Session | |
*/ | |
class MY_Session extends CI_Session | |
{ | |
// -------------------------------------------------------------------------- | |
/** | |
* all_flashdata function. | |
* | |
* @access public | |
* @return void | |
*/ | |
public function all_flashdata() | |
{ | |
// loop through all userdata | |
$out = array(); | |
foreach ($this->userdata as $key => $val) | |
{ | |
// if it contains flashdata, add it | |
if (strpos($key, 'flash:new:') !== FALSE) | |
{ | |
$out[$key] = $val; | |
} | |
} | |
return $out; | |
} | |
// -------------------------------------------------------------------------- | |
} | |
/* End of file MY_Session.php */ | |
/* Location: ./bookymark/application/libraries/MY_Session.php */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment