The array will only contain keys from a given list.
@param array $keys
@return Schemer\Formatter\Assoc
194754
public function only(array $keys) : Assoc
    {
        return $this->pipe(
            function (array $values) use ($keys) : array {
                foreach ($values as $key => $_) {
                    if (!in_array($key, $keys)) {
                        unset($values[$key]);
                    }
                }

                return $values;
            }
        );
    }
941144
protected function read(array $keys)
    {
        $_keys = $lookup = array();
        foreach ($keys as $k) {
            $_k = sha1($k);
            $_keys[] = $_k;
            $lookup[$_k] = $k;
        }
        $_res = array();
        $res = $this->memcache->get($_keys);
        foreach ($res as $k => $v) {
            $_res[$lookup[$k]] = $v;
        }

        return $_res;
    }
1087678
public function replaceKeys(array $keys): self
    {
        $values = \array_values($this->getArray());
        $result = \array_combine($keys, $values);

        return static::create(
            $result,
            $this->iteratorClass,
            false
        );
    }
147362
public static function createFromKeys(array $keys): self
    {
        $keys = \array_filter($keys, function () {
            return true;
        });
        foreach ($keys as $k => $v) {
            if ($v->has('kid')) {
                unset($keys[$k]);
                $keys[$v->get('kid')] = $v;
            }
        }

        return new self($keys);
    }
1174535
function only(array $keys) {
        $new = array();
        foreach($this->data as $key => $val) {
            if(\in_array($key, $keys, true)) {
                $new[$key] = $val;
            }
        }
        
        return (new self($new));
    }
1175752
public function only($keys)
    {
        if (is_null($keys)) {
            return new static($this->items);
        }

        return new static(array_intersect_key($this->items, array_flip((array)$keys)));
    }
538895
public function getTextFromArray(array $keys = [])
    {
        $values = [];
        foreach ($keys as $key) {
            $values[$key] = $this->getText($key);
        }
        return $values;
    }
85498
public function filterByKeys(array $keys)
    {
        /** @noinspection PhpMethodParametersCountMismatchInspection */
        $newInstance = new self();
        $newInstance->setArray(array_filter($this->array, function ($key) use ($keys) {
            return array_search($key, $keys) !== false;
        }, ARRAY_FILTER_USE_KEY));
        return $newInstance;
    }
1368227
public function hasAny($keys)
    {
        $keys = is_array($keys) ? $keys : func_get_args();

        $input = $this->all();

        foreach ($keys as $key) {
            if (Arr::has($input, $key)) {
                return true;
            }
        }

        return false;
    }
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;
  }
1119654
public function flatKeys(array $keys): array
    {
        $this->search = $keys;
        return $this->flatCollection($this->collection->toArray());
    }
1287304
public function select(array $keys)
    {
        $list = [];
        foreach ($keys as $key) {
            if (isset($this->entries[$key])) {
                $list[$key] = $this->entries[$key];
            }
        }

        return $this->createFrom($list);
    }
440923
public function normalizeKeys($keys)
    {
        if ($keys === true) {
            $keys = $this->keys();
        }

        if (empty($keys)) {
            return [];
        }

        return $this->_normalizeAssociations($keys);
    }
320565
public function except($keys)
    {
        $keys = is_array($keys) ? $keys : func_get_args();
        $results = [];
        $inputs = $this->all();
        foreach ($inputs as $key => $input) {
            if(!in_array($key,$keys))
                $results[$key] = $input[$key];
        }
        return $results;
    }
776589
public function only($keys)
    {
        $keys = is_array($keys) ? $keys : func_get_args();

        $results = [];

        $input = $this->all();

        foreach ($keys as $key) {
            Arr::set($results, $key, data_get($input, $key));
        }

        return $results;
    }
1199619
public function hasKeys(array $keys): array
    {
        $list = [];
        foreach ($keys as $key) {
            $list[$key] = $this->hasKey((string)$key);
        }

        return $list;
    }
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;
            }
        );
    }