Created
February 16, 2011 21:58
-
-
Save cranberyxl/830331 to your computer and use it in GitHub Desktop.
Use sessions across client requests
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 | |
class YourTestKernel extends \yourKernel | |
{ | |
protected $session; | |
protected function initializeContainer() | |
{ | |
parent::initializeContainer(); | |
// first use | |
if ($this->session === null) { | |
$this->session = $this->container->get('session'); | |
} else { | |
$this->container->set('session', $this->session); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment