pull() public static method

session获取并删除
public static pull ( string $name, string | null $prefix = null ) : mixed
$name string session名称
$prefix string | null 作用域(前缀)
return mixed
Beispiel #1
0
 public function testPull()
 {
     Session::prefix(null);
     Session::set('sessionnamedel', 'sessionvalue');
     $this->assertEquals('sessionvalue', Session::pull('sessionnameget'));
     $this->assertNull(Session::get('sessionnameget'));
 }