public function getOnce($key, $default = null)
    {
        $read = $this->get($key, $default);
        $this->delete($key);
        return $read;
    }
public function getOnce($key, $default = null)
    {
        $read = $this->get($key, $default);
        $this->delete($key);
        return $read;
    }
public function getOnce ( $ key , $ default = null ) { $ read = $ this -> get ( $ key , $ default ) ; $ this -> delete ( $ key ) ; return $ read ; }
Read a value from the session and unset it, this is a form of read
once flash memory using the session.

@param string $key     in session variable.
@param mixed  $default default value to return when key is not set
in the session.

@return mixed value from session and null if not set.
Read a value from the session and unset it this is a form of read once flash memory using the session .