Read-once flashes

A "flash" is a session value that propagates only until it is read, at which time it is removed from the session. Taken from ideas popularized by Ruby on Rails, this is useful for forwarding information and messages between page loads without using GET vars or cookies.

Solar_Session is used for setting and reading flashes.

<?php
$session = Solar::factory('Solar_Session', array('class' => 'Vendor_Example'));

$session->setFlash('saved', 'Something was saved');

// in a new request
$saved = $session->getFlash('saved', false);

// now $saved holds a message text or false
// if there wasn't a flash set for key 'saved'
?>