Forgets the given index of (a) given key(s).
Returns all containing keys.

@param  string       $type
@param  string|array $givenKeys
@return array
512899
protected function forgetIndexType($type, $givenKeys)
    {
        $this->setKeywordsOperation(true);

        $givenKeys = is_array($givenKeys) ? $givenKeys : func_get_args();

        switch ($type) {
            case 'inverse':
                $getKeyCallback = function ($givenKey) {
                    return $this->generateInverseIndexKey($givenKey);
                };
                break;
            case 'keyword':
            default:
                $getKeyCallback = function ($givenKey) {
                    return $this->generateIndexKey($givenKey);
                };
                break;
        }

        $affected = [];
        foreach ($givenKeys as $givenKey) {
            $affected = array_merge($affected, parent::pull(call_user_func($getKeyCallback, $givenKey), []));
        }

        $this->setKeywordsOperation(false);

        return array_unique($affected);
    }
711325
function getFromKeys(array $keys)
    {
        $result = [];
        try {
            foreach ($keys as $key)
            {
                $result[] = $this->get($key);
            }
        } catch (\Exception $e) {
            throw new exReadError($e->getMessage(), $e->getCode(), $e);
        }
    }
21391
public static function getIdProperties(array &$mappings, string $type) 
    {
        $idProperties = [];

        if (\is_scalar($type) && !empty($mappings[$type])) {
            $idProperties = $mappings[$type]->getIdProperties();
        }

        return $idProperties;
    }
664286
public function remove($type, $key, $remainingFields = array())
    {
        // Load
        $json = $this->load();

        // Remove
        $columns = $json[$type]["elements"][$key]["columns"];
        unset($json[$type]["elements"][$key]);
        if (is_array($columns)) {
            foreach ($columns as $field) {
                $json = $this->removeField($type, $field, $json, $remainingFields);
            }
        }
        $this->sortJson($json);
        $this->write($json);
    }
275847
public function fetchAllKeyPair(string $sql, array $params = [], array $types = []): array
    {
        $stmt = $this->conn->executeQuery($sql, $params, $types);

        return $stmt->fetchAll(PDO::FETCH_KEY_PAIR);
    }
121236
public function exclude($keys)
    {
        if (! is_array($keys)) {
            $keys = func_get_args();
        }

        $this->exclude = array_filter($keys);

        return $this;
    }
45386
public function forgetMany(array $keys)
    {
        if (! method_exists($this->memcached, 'deleteMulti')) {
            return array_combine($keys, array_map([$this, 'forget'], $keys));
        }

        $result = $this->memcached->deleteMulti($this->prefixKeys($keys));

        return array_fill_keys($keys, $result);
    }
810731
private static function getNumberOfPKs($type) {
    if (!isset(self::$numPkKeys[$type])) {
      $numPKs = 1;
      $persistenceFacade = ObjectFactory::getInstance('persistenceFacade');
      if ($persistenceFacade->isKnownType($type)) {
        $mapper = $persistenceFacade->getMapper($type);
        $numPKs = sizeof($mapper->getPKNames());
      }
      self::$numPkKeys[$type] = $numPKs;
    }
    return self::$numPkKeys[$type];
  }
1197831
public static function deletePropertiesNotInFilter(array &$mappings, array &$array, string $typeKey)
    {
        if (\array_key_exists(Serializer::CLASS_IDENTIFIER_KEY, $array)) {
            $newArray = [];
            $type = $array[Serializer::CLASS_IDENTIFIER_KEY];

            self::deleteMatchedClassNotInFilterProperties($mappings, $array, $typeKey, $type, $newArray);

            if (!empty($newArray)) {
                $array = $newArray;
            }
        }
    }
843872
public function get($key, $type = null) {
        foreach ($this->children as &$child) {
            if ($child->key === $key && ($type == null || $type == $child->type)) {
                return $child;
            }
        }
        foreach ($this->prependchildren as &$child) {
            if ($child->key === $key && ($type == null || $type == $child->type)) {
                return $child;
            }
        }
        return false;
    }
1143260
public static function remove($key, $type = 'ses')
    {
        $GLOBALS['TSFE']->fe_user->setKey(self::isType($type), $key, null);
        $GLOBALS['TSFE']->fe_user->storeSessionData();
    }
127738
private function prepareComponentList (array $types)
    {
        $this->types = [];

        foreach ($types as $type)
        {
            $this->types[$type->getKey()] = $type;
        }
    }
106036
protected function indexedMarksToArray(array $givenMarks)
    {

        $marks = [];

        foreach ($givenMarks as $mark) {

            if (strpos($mark, '!') === 0) {
                $marks[substr($mark, 1)] = false;
                continue;
            }

            $marks[$mark] = true;

        }

        return $marks;
    }
241038
public function &get($type) {
        $list = array();

        foreach ($this->args as &$d) {
            if ($this->_isType($d, $type)) {
                $list[] = $d;
            }
        }

        return $list;
    }
627792
public function many(array $keys)
    {
        $prefixedKeys = array_map(function ($key) {
            return $this->prefix.$key;
        }, $keys);

        if ($this->onVersionThree) {
            $values = $this->memcached->getMulti($prefixedKeys, Memcached::GET_PRESERVE_ORDER);
        } else {
            $null = null;

            $values = $this->memcached->getMulti($prefixedKeys, $null, Memcached::GET_PRESERVE_ORDER);
        }

        if ($this->memcached->getResultCode() != 0) {
            return array_fill_keys($keys, null);
        }

        return array_combine($keys, $values);
    }
1115613
public function without($keys)
    {
        if (is_scalar($keys)) {
            $keys = [$keys];
        }
        $ret = clone $this;
        foreach ($keys as $key) {
            $ret->removeKey($key);
        }

        return $ret;
    }
673207
public function clear($type = null)
    {
        if (is_null($type)) {
            $_SESSION[$this->key] = [];
        } else {
            unset($_SESSION[$this->key][$type]);
        }

        return $this;
    }