To shift session data from session array

@param string $name

@return string
509612
public function shift($name)
    {
        $previousValue = $this->get($name);

        $value = array_shift($previousValue);

        $this->create($name, $previousValue);

        return $value;
    }
915253
public function unsetVariable($name)
    {
        $retval = false;

        if (array_key_exists($name, $_SESSION)) {
            unset($_SESSION[$name]);
            $retval = true;
        }

        return $retval;
    }
1042521
public function old($name)
    {
        if (isset($this->session)) {
            $key = $this->transformKey($name);
            $payload = $this->session->getOldInput($key);

            if (!is_array($payload)) {
                return $payload;
            }

            if (!in_array($this->type, ['select', 'checkbox'])) {
                if (!isset($this->payload[$key])) {
                    $this->payload[$key] = collect($payload);
                }

                if (!empty($this->payload[$key])) {
                    $value = $this->payload[$key]->shift();
                    return $value;
                }
            }

            return $payload;
        }
    }
359185
public static function get($name, $options = [])
    {
        RequestSession::_start();

        $default = isset($options["default"]) ? $options["default"] : null;

        return isset($_SESSION[$name]) ? $_SESSION[$name] : $default;
    }
170313
protected function _getVar($name)
    {
        $store = $this->_getVariableStore();

        if ($store instanceof \Zend_Session_Namespace) {
            if ($store->__isset($name)) {
                return $store->__get($name);
            }
        } else {
            if ($store->offsetExists($name)) {
                return $store->offsetGet($name);
            }
        }

        return null;
    }
121677
public function set($name)
    {
        $filters = array_unique ($this->session->get('filters', array()));

        if (in_array ($name, $filters)) {
            return array_search ($name, $filters);
        }
        
        $filterKey = 'filter_'.sha1(microtime(true).mt_rand().$name);
        $filters[$filterKey] = $name;
        $this->session->set('filters', $filters);

        return $filterKey;
    }
777831
public static function delete($name)
    {
        empty(self::$init) && self::init();

        $session = self::get($name);
        if (is_string($session)) {
            unset($_SESSION[$name]);
        }

        if (is_array($session)) {
            $_SESSION[$name] = [];
        }
        return true;
    }
1167466
public function get($name)
    {
        $name = $this->normalizeName($name);
        $data = [];
        if (isset($this->data[$name])) {
            $data = $this->data[$name];
        }

        return $data;
    }
1358294
static function isStoredInSession( $name )
    {
        $http = eZHTTPTool::instance();
        if ( !$http->hasSessionVariable( eZPreferences::SESSION_NAME, false ) )
            return false;
        $preferencesInSession = $http->sessionVariable( eZPreferences::SESSION_NAME );
        return array_key_exists( $name, $preferencesInSession );
    }
876357
public static function getRaw($name)
	{
		$value = null;
		$rawCookies = !empty($_SERVER['HTTP_COOKIE'])
			? explode('; ', $_SERVER['HTTP_COOKIE'])
			: array();
		foreach ($rawCookies as $kv) {
			$pair = explode('=', $kv, 2);
			$k = array_shift($pair);
			$v = array_shift($pair);
			$k = str_replace(' ', '_', urldecode($k));
			if ($k == $name) {
				$value = urldecode($v);
				break;
			}
		}
		return $value;
	}
643661
public function getSessionParameter($name)
    {
        if ($this->sessionParameters->has($name)) {
            return $this->sessionParameters->get($name);
        }
    }
344690
public function load($name)
  {
    if (isset($this->_data[$name])) {
      if (is_null($this->_data[$name])) {
        $data = array();
      } else {
        $data = $this->_data[$name];
      }
    } else {
      if (is_null($this->_stored)) {
        $data = array();
      } else {
        $data = $this->_stored->load($name);
      }
    }
    
    return $data;
  }
339253
public function sessionName($name = null)
    {
        if ($name === null) {
            return session_name();
        }
        if ($this->isOpen) {
            throw new \InvalidArgumentException('The session has already been opened.');
        }
        if (!is_string($name)) {
            throw new \InvalidArgumentException('Session name must be null or a string');
        }
        session_name($name);
    }
140274
protected function getRequestValue($name) {
    $requestValues = $this->getLocalSessionValue(self::REQUEST_VAR);
    return isset($requestValues[$name]) ? $requestValues[$name] : null;
  }
630942
public static function get($name = '')
    {
        empty(self::$init) && self::init();

        return empty($name) ? $_SESSION : (isset($_SESSION[$name]) ? $_SESSION[$name] : false);
    }
642751
public function rename($name)
    {
        return $this->client->apiCall('groups.rename', [
            'channel' => $this->getId(),
            'name' => $name,
        ])->then(function () use ($name) {
            $this->data['name'] = $name;
            return $name;
        });
    }
1188060
public function removeSession($name)
    {
        if ($this->builderMustExist($name)->hasSession($name)) {
            unset($this->sessions[$name]);
        }

        return $this;
    }