putData() public method

Stores the given data under the given key in the session
public putData ( string $key, mixed $data ) : void
$key string The key under which the data should be stored
$data mixed The data to be stored
return void
 /**
  * @test
  * @expectedException \Neos\Flow\Session\Exception\SessionNotStartedException
  */
 public function putDataThrowsExceptionIfSessionIsNotStarted()
 {
     $session = new Session();
     $session->putData('some key', 'some value');
 }