Get multiple values in session.

@param (array) $keys    keys
@param (mixed) $default default value if sesion is not exists

@since 3.0.0

@return array
546140
public function getMultiple($keys)
    {
        $value = [];
        foreach ($keys as $key) {
            $value[$key] = self::get($key, $default);
        }

        return $value;
    }
924546
public function offsetGet($key, $default = null)
    {
        return isset($this->values[$key]) ? $this->values[$key] : $default;
    }
793172
public static function getSessionValue($key, $default=null) {
		if(!isset($_SESSION)){
			session_start();
		}
		return (isset($_SESSION[$key]) ? $_SESSION[$key] : $default);
	}
251117
public function get($key, $default = null)
    {
        $this->initSession();
        $key_name = $this->getSessionKeyName($key);

        if (isset($_SESSION[$key_name])) {
            return $_SESSION[$key_name];
        } else {
            return $default;
        }
    }
985538
public function getSessionAttribute($key, $default = false) {
		return isset($this->sessionAttributes[$key]) ? $this->sessionAttributes[$key] : $default;
	}
1077302
public function get($key = null, $default = null)
    {
        if (is_null($key)) {
            return $this->array;
        }

        if (false === strpos($key, $this->separator)) {
            return $this->array[$key] ?? $this->defaultValue($key, $default);
        }

        $keyArray = explode($this->separator, $key);
        $tmp      = $this->array;
        foreach ($keyArray as $k) {
            if (isset($tmp[$k])) {
                $tmp = $tmp[$k];
            } else {
                $tmp = $this->defaultValue($key, $default);
                break;
            }
        }
        return $tmp;
    }
823633
public static function getArray(
        array $options,
        string $key,
        $default = null
    ) {
        if (array_key_exists($key, $options)) {
            return (array)$options[$key];
        }

        return $default;
    }
1225605
public function get($key, $default = null)
    {
        if (!$this->id) {
            throw new Exception('Cannot use get without active session.');
        }
        return array_key_exists($key, $this->data) ? $this->data[$key] : $default;
    }
808044
public static function get($array, $key, $default = null)
    {
        if (null === $key) {
            return $array;
        }

        if (isset($array[$key])) {
            return $array[$key];
        }

        foreach (explode('.', $key) as $segment) {
            if (static::accessible($array) && static::exists($array, $segment)) {
                $array = $array[$segment];
            } else {
                return value($default);
            }
        }

        return $array;
    }
429122
public function getMultiple($keys, $default = null)
    {
        // Prepare defaults
        $values = array_fill_keys($keys, $default);

        // Get document
        $documents = $this->collection->getDocuments($keys);
        if (empty($documents)) {
            return $values;
        }

        // Mongo deletes document not exactly when set in field
        // Required date checking
        // Expiration may be empty for keys which never expired
        foreach ($documents as $document) {
            /** @var \MongoDate $expiredAt */
            $expiredAt = $document->get(self::FIELD_NAME_EXPIRED);
            if (empty($expiredAt) || $expiredAt->sec >= time()) {
                $values[$document->getId()] = $document->get(self::FIELD_NAME_VALUE);
            } else {
                $values[$document->getId()] = $default;
            }
        }

        return $values;
    }
480570
public function getArray($key, array $default = array())
    {
        $value = $this->get($key, null);

        return null !== $value ? (array) $value : (array) $default;
    }
1109011
public static function getValueOfArray(array $array, $key, $default = null)
    {
        if (null === $key) {
            return $array;
        }

        if (\array_key_exists($key, $array)) {
            return $array[$key];
        }

        if (!\strpos($key, '.')) {
            return $default;
        }

        foreach (\explode('.', $key) as $segment) {
            if (\is_array($array) && \array_key_exists($segment, $array)) {
                $array = $array[$segment];
            } else {
                return $default;
            }
        }

        return $array;
    }
699367
public function get($key, $default = null)
    {
        $array = $this->objects;

        if (isset($array[$key])) {
            return $array[$key];
        }
        foreach (explode('\\', $key) as $segment) {
            if (!is_array($array) || !array_key_exists($segment, $array)) {
                return $default;
            }
            $array = $array[$segment];
        }
        return $array;
    }
217150
public function get(string $key,string $default=null)
  {
    $keys = explode('.',$key);
    $val = $this->confValues;

    for ($i=0; $i<count($keys); $i++) {
      $val = ( $val[ $keys[$i] ] ?? null);
      if (is_null($val)) break;
    }

    return $val ?? $default;
  }
785148
public function getMultiple($keys, $default = null)
    {
        $cache = [];
        foreach ($keys as $key) {
            $cache[$key] = $this->get($key, $default);
        }

        return $cache;
    }
232206
public function getAsArray($key, array $default = array())
    {
        $value = parent::get($key, $default);
        if (is_array($value) && !$value) $value = $default;
        return (array)$value;
    }
401183
public static function getDefault($keys, $defaultValue) {
    try {
      $value = self::req($keys);
    } catch (MissingConfigVariableException $e) {
      return $defaultValue;
    }
    
    return $value;
  }