src/mako/session/Session.php
public function getAndRemove(string $key, $default = null)
	{
		$storedValue = $this->get($key, $default);

		$this->remove($key);

		return $storedValue;
	}
public function getAndRemove(string $key, $default = null)
	{
		$storedValue = $this->get($key, $default);

		$this->remove($key);

		return $storedValue;
	}
public function getAndRemove ( string $ key , $ default = null ) { $ storedValue = $ this -> get ( $ key , $ default ) ; $ this -> remove ( $ key ) ; return $ storedValue ; }
Gets a value from the session and removes it.

@param  string $key     Session key
@param  mixed  $default Default value
@return mixed
Gets a value from the session and removes it .