(Yaf >=1.0.0)
Yaf_Session::current — Get current session entry value
Returns the value of the current session entry during iteration.
This function has no parameters.
The value of the current session entry.
Example #1 Yaf_Session::current() example
<?php
$session = Yaf_Session::getInstance();
$session->start();
$session->set("user_id", 42);
$session->set("is_vip", true);
foreach ($session as $key => $value) {
// Yaf_Session::current() yields each value while iterating
echo "$key => ";
var_dump($value);
}
?>The above example will output something similar to:
user_id => int(42) is_vip => bool(true)