Remove path segments from the URI path according to their offsets.

@param int... $keys

@return Psr7UriInterface|UriInterface
542028
public static function removeSegments($uri, int $key, int ... $keys)
    {
        $uri = self::filterUri($uri);

        return self::normalizePath($uri, (new HierarchicalPath($uri->getPath()))->withoutSegment($key, ...$keys));
    }
927407
public function mdelete($keys){
		//$this->queries_mset_count++;
		$result=true;
		foreach($keys as $key){
			$r=$this->delete($key);
			$result=$result & $r;
			}
		return $result;
		}
390628
public function strip(array $keys) : Assoc
    {
        return $this->pipe(
            function (array $values) use ($keys) : array {
                foreach ($keys as $key) {
                    if (isset($values[$key])) {
                        unset($values[$key]);
                    }
                }

                return $values;
            }
        );
    }
1219921
public function remove(array $keys) {
    $data =& $this->data;
    
    if ($keys === array() || $keys == NULL) {
      return $this;
    }
    
    $lastKey = array_pop($keys);
    foreach ($keys as $key) {
      if (!array_key_exists($key,$data)) {
        return $this;
      }
      $data =& $data[$key];
    }
    if (array_key_exists($lastKey, $data)) 
      unset($data[$lastKey]);
    
    return $this;
  }
893700
public function setPath($key, $path)
	{
		$this->paths[(string) $key] = (string) $path;

		return $this;
	}
429370
public function removeActionErrors(...$keys) {
        $errors = $this->getAttribute(ACTION_ERRORS_KEY);
        $dropped = [];

        foreach ($keys as $key) {
            if (isset($errors[$key]))
                $dropped[$key] = $errors[$key];
            unset($this->attributes[ACTION_ERRORS_KEY][$key]);
        }
        if ($keys)
            return $dropped;

        unset($this->attributes[ACTION_ERRORS_KEY]);
        return $errors;
    }
573857
public static function fromKeys($keys){
        $hash = new Dictionary();
        foreach($keys as $key){
            $hash[$key] = NULL;
        }
        return $hash;
    }
607600
public function except($keys)
    {
        $keys = is_array($keys) ? $keys : func_get_args();

        $results = $this->payload();

        foreach ($keys as $key) {
            $this->removeValue($results, $key);
        }
        return $results;
    }
155179
public function reflash(array $keys = array())
    {
        $data = empty($keys) ? $this->session : array_intersect_key($this->session, array_flip($keys));
        return $this->clear($data);
    }
423753
public function purge(array $keys=null)
    {

        if ($keys === null) {

            $someonePurged = false;

            $storages = $this->preloadAllStorages();

            foreach ($storages as $url=>$storage) {

                if ($result = $storage->purge()) {
                    $someonePurged = true;
                }

                $this->removeStorageIfLoaded($url);

            }

            return $someonePurged;
        }

        if (!$keys) {
            return false;
        }

        foreach ($keys as $key) {
            $this->offsetUnset($key);
        }

        return $this->persist();

    }
381381
public function forget($keys = null)
    {
        if (is_null($keys)) {
            $this->items = [];
            return $this;
        }

        foreach ((array)$keys as $key) {
            unset($this->items[$key]);
        }

        return $this;
    }
988057
public function withoutQueryValue($key):UriExtended{
		$current = $this->getQuery();

		if($current === ''){
			return $this;
		}

		$decodedKey = \rawurldecode($key);

		$result = \array_filter(\explode('&', $current), function($part) use ($decodedKey){
			return \rawurldecode(\explode('=', $part)[0]) !== $decodedKey;
		});

		return $this->withQuery(\implode('&', $result));
	}
28539
public function purge(array $keys=null)
    {
        if ($keys === null) {
            $this->_attributes = [];
            return $this->filesystem->delete($this->url);
        }

        if (!$keys) {
            return false;
        }

        $this->bootOnce();

        foreach ($keys as $key) {
            $this->offsetUnset($key);
        }

        return $this->persist();
    }
409410
public function delete(array $keys) {
		if ($this->_config['scope']) {
			$keys = $this->_addScopePrefix($this->_config['scope'], $keys);
		}
		return apc_delete($keys) === [];
	}
155258
public static function removeParams($uri, string $key, string ... $keys)
    {
        return $uri->withQuery((string) (new Query(self::filterUri($uri)->getQuery()))->withoutParam($key, ...$keys));
    }
661599
public function clear(array $keys=null)
    {
        if ($keys === null) {
            foreach ($this->storages as $storage) {
                $storage->clear();
            }
            return $this;
        }

        if (!$keys) {
            return $this;
        }

        foreach ($keys as $key) {
            $this->offsetUnset($key);
        }

        return $this;
    }
55708
public function del(...$keys)
    {
        $this->prepareArguments('del', ...$keys);
        $this->init();
        return $this->driver->del(...$keys);
    }