@param string $key
@param Slice  $slice

@return array
@throws NotFound
431827
protected function storage($key, Slice $slice)
    {
        list($path, $regex) = $this->path($slice);

        return [
            'scheme'    => $this->slice->getData('scheme', $this->scheme),
            'domain'    => $this->slice->getData('domain', $this->domain),
            'regex'     => $regex,
            'path'      => $path,
            'key'       => $this->key . '.' . $key,
            'defaults'  => $this->slice->getData('defaults', []),
            'methods'   => $this->slice->getData('methods', []),
        ];
    }
104525
public function getMessage($key = null) {
		$result = [];
		if (empty($key)) {
			return $result;
		}

		$sessionKey = $this->_sessionKey . '.' . $key;
		if (!CakeSession::check($sessionKey)) {
			return $result;
		}

		$data = CakeSession::read($sessionKey);
		if (empty($data)) {
			return $result;
		}

		$result = (array)$data;
		if (isAssoc($result)) {
			$result = [$result];
		}

		return $result;
	}
219705
public function resource($slice = -2)
    {
        $segments = explode('/', trim(app('request')->getUri(), '/'));

        if ($slice != 0) {
            $segments = array_slice($segments, 0, $slice);
        }

        return implode('/', $segments);
    }
311589
private function GetArrayVal($arr,$key,$not_defined_val = "")
	{
		return array_key_exists($key,$arr)
			? $arr[$key]
			: $not_defined_val;
	}
901869
protected function update($slice): self
    {
        if (is_array($slice))
        {
            $slice = new Slice($slice);
        }

        $this->expire   = $slice->getData('expire', $this->expire);
        $this->domain   = $slice->getData('domain', $this->domain);
        $this->secure   = $slice->getData('secure', $this->secure);
        $this->path     = $slice->getData('path', $this->path);
        $this->httpOnly = $slice->getData('httpOnly', $this->httpOnly);

        if ($this->expire instanceof Carbon)
        {
            $this->expire = $this->expire->timestamp;
        }

        if ($this->expire > \time())
        {
            $this->expire -= \time();
        }

        return $this;
    }
243573
public function getArray($key)
    {
        try {
            $result = $this->get(self::DATA_ARRAY, $key);
            if (!settype($result, 'array')) {
                return null;
            }
        } catch (\Exception $e) {
            return null;
        }
        return $result;
    }
198381
public function &offsetGet($key) {
        if(!$this->offsetExists($key)) {
            throw new KeyNotFoundException($key);
        }
        return $this->table[$key]->getValue();
    }
326804
def _create_slice(self, key):
        """"""

        if isinstance(key, slice):
            step = key.step
            if step is None:
                step = 1

            if step != 1:
                raise ArgumentError("You cannot slice with a step that is not equal to 1", step=key.step)

            start_address = key.start
            end_address = key.stop - 1

            start_i, start_seg = self._find_address(start_address)
            end_i, _end_seg = self._find_address(end_address)

            if start_seg is None or start_i != end_i:
                raise ArgumentError("Slice would span invalid data in memory",
                                    start_address=start_address, end_address=end_address)

            block_offset = start_address - start_seg.start_address
            block_length = end_address - start_address + 1

            return start_seg, block_offset, block_offset + block_length
        elif isinstance(key, int):
            start_i, start_seg = self._find_address(key)
            if start_seg is None:
                raise ArgumentError("Requested invalid address", address=key)

            return start_seg, key - start_seg.start_address, None
        else:
            raise ArgumentError("Unknown type of address key", address=key)
1223074
function push($key,$val) {
		$ref=&$this->ref($key);
		$ref[]=$val;
		return $val;
	}
1286739
private static function recursiveSetFromKey($data, $key, $value)
    {
        if (empty($key)) {
            return $value;
        } else {
            if (!is_array($data)) {
                $data = [];
            }
            $currentKey = array_shift($key);

            if (!isset($data[$currentKey])) {
                $data[$currentKey] = [];
            }

            $data[$currentKey] = self::recursiveSetFromKey($data[$currentKey], $key, $value);
            return $data;
        }
    }
267830
function getFromKeys(array $keys)
    {
        $realm = $this->getRealm();


        foreach ($keys as $i => $k)
            $keys[$i] = "'$k'";

        $keys = implode(', ', $keys);

        try {
            $sql = "SELECT * FROM `KVStore` WHERE `realm` = '$realm' and `key` IN ($keys);";

            $stm = $this->pdo->prepare($sql);
            $stm->execute();
            $stm->setFetchMode(\PDO::FETCH_ASSOC);

            $c = $stm->fetchAll();

            foreach ($c as $d) {
                $key     = $d['key'];
                $val     = $this->getDataInterchange()->retrieveBackward( $d['value'] );

                parent::set($key, $val);
                yield $key => $val;
            }

        } catch (\Exception $e) {
            throw new exReadError($e->getMessage(), $e->getCode(), $e);
        }
    }
966751
protected function getValuesFromKeyMap( $key )
    {
        if ( empty( $key ) || empty( $this->keyMap[$key] ) )
        {
            return null;
        }

        return $this->keyMap[$key];
    }
257879
public function spop($key, $count = null) {
        $params = [$key];
        if ($count) {
            $params[] = $count;
        }
        return $this->returnCommand(['SPOP'], $key, $params);
    }
1080280
private function getQueryOptions(/* $key, ... */)
    {
        return array_filter(
            array_intersect_key($this->query, array_flip(func_get_args())),
            function($value) { return $value !== null; }
        );
    }
377466
public function isLast($key)
	{
		if ($this->rows && $this->count())
		{
			return $key == array_slice($this->rows, -1, 1)[0]->getPkValue();
		}

		return false;
	}
59017
function slice(source, keys){
    var result = {};

    if (!keys)
      return extend(result, source);

    for (var i = 0, key; key = keys[i++];)
      if (key in source)
        result[key] = source[key];

    return result;
  }
1245045
public function getDataAsArray($key = 'data')
    {
        $data = $this->getData();

        if (null === $data) {
            return array();
        }

        if (!is_array($data)) {
            $data = array($key => $data);
        }

        return $data;
    }