Skip to content

Instantly share code, notes, and snippets.

@frodosghost
frodosghost / LegacySessionStorage.php
Last active April 28, 2016 12:11 — forked from tcz/LegacySessionStorage.php
Bridging the gap between standard $_SESSION and HttpFoundation Session with Silex.
<?php
namespace Session\Storage;
use Symfony\Component\HttpFoundation\Session\Storage\PhpBridgeSessionStorage;
/**
* Session storage that avoids using _sf2_attributes subkey in the $_SESSION
* superglobal but instead it uses the root variable.
*
@frodosghost
frodosghost / flash_message_usage.php
Created May 23, 2011 12:52 — forked from BaylorRae/flash_messages.php
Flash Messages for PHP
<?php
/**
* Usage Examples
*/
$flash_message = FlashMessage::getInstance();
$flash_message->set('notice', 'This is a notice message');
$flash_message->flash('This is a flash message');
?>
<?php if ($flash_message->has('notice')) : ?>