public function save(ServletSessionInterface $session)
{
// don't save the session if it has been destroyed
if ($session->getId() == null) {
return;
}
// prepare the session filename
$sessionFilename = $this->getSessionSavePath($this->getSessionSettings()->getSessionFilePrefix() . $session->getId());
// update the checksum and the file that stores the session data
if (file_put_contents($sessionFilename, $this->marshall($session)) === false) {
throw new SessionCanNotBeSavedException(sprintf('Session with ID %s can\'t be saved'));
}
}