Neos\Flow\Session\TransientSession::start PHP 메소드

start() 공개 메소드

Starts the session, if it has not been already started
public start ( ) : void
리턴 void
    public function start()
    {
        $this->sessionId = uniqid();
        $this->started = true;
    }

Usage Example

 /**
  * @test
  */
 public function hasKeyReturnsTrueOrFalseAccordingToAvailableKeys()
 {
     $session = new Session\TransientSession();
     $session->start();
     $session->putData('theKey', 'some data');
     $this->assertTrue($session->hasKey('theKey'));
     $this->assertFalse($session->hasKey('noKey'));
 }
All Usage Examples Of Neos\Flow\Session\TransientSession::start