Return object and remove it from session.

@param string $name
@return mixed
512195
public function getFlashObject($name)
    {
        $serialized = $this->__get($name);

        $object = \is_string($serialized) ? unserialize($serialized, ['allowed_classes' => true]) : $serialized;

        $this->__unset($name);

        if ($name === 'files-upload') {
            $grav = Grav::instance();

            // Make sure that Forms 3.0+ has been installed.
            if (null === $object && isset($grav['forms'])) {
                user_error(
                    __CLASS__ . '::' . __FUNCTION__ . '(\'files-upload\') is deprecated since Grav 1.6, use $form->getFlash()->getLegacyFiles() instead',
                    E_USER_DEPRECATED
                );

                /** @var Uri $uri */
                $uri = $grav['uri'];
                /** @var Grav\Plugin\Form\Forms $form */
                $form = $grav['forms']->getActiveForm();

                $sessionField = base64_encode($uri->url);

                /** @var FormFlash $flash */
                $flash = $form ? $form->getFlash() : null;
                $object = $flash ? [$sessionField => $flash->getLegacyFiles()] : null;
            }
        }

        return $object;
    }
300633
public function withoutData($name)
    {
        $copy = clone $this;
        $copy->data = Hash::remove($copy->data, $name);

        return $copy;
    }
228073
public function delete($name)
    {
        $this->connect();
        $key = $this->getCacheKey($name);

        return self::$instance->delete($key);
    }
44960
public function remove($name)
    {
        $removed = false;
        if ($this->has($name)) {
            unset($this->_inputs[$name]);
            $removed = true;
        }
        return $removed;
    }
643661
public function getSessionParameter($name)
    {
        if ($this->sessionParameters->has($name)) {
            return $this->sessionParameters->get($name);
        }
    }
728630
public function get($name)
    {
        $this->_validate();
        if (array_key_exists($name, $_SESSION[$this->publicStorage]['store'][$this->_namespaceName])) {
            return $_SESSION[$this->publicStorage]['store'][$this->_namespaceName][$name];
        }
        return false;
    }
982317
public function getSession($name)
    {
        if (!$this->hasSession($name)) {
            $this->createSession($name);
        }

        return $this->sessions[$name];
    }
236834
public function remove($name)
    {
        $loader = $this->loader($name);
        $path = $loader->path();

        if (!File::isFile($path)) {
            throw new NotFound\Path($path);
        }

        return File::remove($path);
    }
608011
public static function remove($name)
	{
		$names = parseCfgName($name);
		if (isset($names[1]))
		{
			// 删除数据
			$first = array_shift($names);
			$obj = self::getInstance($first);
			return $obj->remove($name);
		}
		else
		{
			// 删除配置分组
			unset(self::$instances['Config'][$name]);
			return true;
		}
	}
1150654
public static function removeSessionValue(string $name)
    {
        self::ensureSession();
        
        try {
            unset($_SESSION[$name]);
            session_write_close();
        }
        catch (\Exception $ex) {
            error_log("Error trying to remove session value. ");
        }
    }
270843
public function pull($name) {
        $result = $this->get($name, false);
        if ($result) {
            $this->rm($name);
            return $result;
        }
        else {
            return;
        }
    }
580323
public function get($name)
    {
        return ($this->session->has($name)) ? $this->session->get($name) : '';
    }
1128355
public function delete($name){

		$name = $this->_prependPrefix($name);

		$result = @$this->_Memcache->delete($name);

		return $result;
	}
134054
public function unregister($name)
    {
        if (!isset($this->registry[$name])) {
            throw new Exception('Object with name "'.$name.'" is not registered');
        }

        $object = $this->registry[$name];
        unset($this->registry[$name]);

        return $object;
    }
1262329
static public function del($name)
    {
        if (isset(Loader::$callback['CacheDel'])) {
            return call_user_func_array(Loader::$callback['CacheDel'], func_get_args());
        }
        return self::check() && @unlink(self::$cachepath . $name);
    }
654390
public function remove($name)
    {
        $name = $this->normalizeName($name);
        if (isset($this->data[$name])) {
            unset($this->data[$name]);
        }

        return $this;
    }
1199891
public function delete($name){

		try{

			$name = $this->_cleanName($name);
		}
		catch(CacheException $e){

			return false;
		}

		return $this->_Cache->delete("{$this->_store}:$name");
	}