Nov.24
Nov.24
Testing Gist Integration
Let’s test Gist integration
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
/** | |
* Writes a value to the current session data. | |
* | |
* @param string $key String identifier. | |
* @param mixed $value Single value or array of values to be written. | |
* @return mixed Value or array of values written. | |
* @throws InvalidArgumentTypeException Session key is not a string value. | |
*/ | |
public static function write($key, $value) | |
{ | |
if ( !is_string($key) ) | |
throw new InvalidArgumentTypeException('Session key must be string value'); | |
self::_init(); | |
$_SESSION[$key] = $value; | |
self::_age(); |