Finds an entry of the container by its identifier and returns it.

@param string $key Identifier of the entry to look for.


@return mixed Entry.
480212
public function get($key)
    {
        if (!$this->has($key)) {
            throw new \Exception(sprintf('Identifier "%s" is not defined.', $key));
        }
        try {
            return $this->offsetGet($key);
        } catch (\Exception $exception) {
            throw $exception;
        }
    }
321980
public function &offsetGet($key)
    {
        if(!$this->has($key))
            return null;

        return DotArray::getReference($this->storage, $key);
    }
1223752
public function seek($key)
    {
        $thisData = $this->getRawData();
        $item = $thisData[$this->position][$this->key];

        if (!$item instanceof Stub || !$item->position) {
            return;
        }
        $keys = array($key);

        switch ($item->type) {
            case Stub::TYPE_OBJECT:
                $keys[] = "\0+\0".$key;
                $keys[] = "\0*\0".$key;
                $keys[] = "\0~\0".$key;
                $keys[] = "\0$item->class\0$key";
            case Stub::TYPE_ARRAY:
            case Stub::TYPE_RESOURCE:
                break;
            default:
                return;
        }

        $data = null;
        $children = $thisData[$item->position];

        foreach ($keys as $key) {
            if (isset($children[$key]) || array_key_exists($key, $children)) {
                $data = clone $this;
                $data->key = $key;
                $data->position = $item->position;
                break;
            }
        }

        return $data;
    }
332316
public function offsetGet($key)
    {
        if (!\is_array($key)) {
            return $this->offsetExists($key) ? $this->container[$key] : null;
        }

        $namespace = key($key);
        $key = current($key);

        if (!$this->offsetExists($namespace) || !\is_array($this->container[$namespace])) {
            return null;
        }

        if (isset($this->container[$namespace][$key]) || \array_key_exists($key, $this->container[$namespace])) {
            return $this->container[$namespace][$key];
        }

        return null;
    }
1149207
public function get($key)
    {
        $storageValue = null;
        if (true === array_key_exists($key, $this->storage)) {
            $storageValue = $this->storage[$key];
        }
        return $storageValue;
    }
1341915
public function getItem($key)
    {
        $this->validateKey($key);

        if ($this->hasItem($key)) {
            return $this->data[$key];
        }

        # If we didn't find a suitable item then create a new one now
        return new Item($key);
    }
234442
public function get($key)
    {
        $textRegistry = $this->getTextRegistry();
        if (is_string($key) && isset($textRegistry[$key])) {
            return $textRegistry[$key];
        }
        return $key;
    }
302129
public function get($key)
	{
		$key = $this->id($key);
		return $this->apcu ? apcu_fetch($key) : apc_fetch($key);
	}
1299807
public function lookup($key)
    {
        Arguments::define($this->getKeyType())->check($key);

        if (!$this->member($key)) {
            return Maybe::nothing();
        }

        return Maybe::just($this->value[$key]);
    }
297813
public function get(string $key)
    {
        $key = $this->hashKey($key);
        if (\array_key_exists($key, $this->cache)) {
            $this->hits++;
            return $this->cache[$key];
        }
        $this->misses++;
        return null;
    }
411331
private function find($id)
    {
        if (! isset($this->registry[$id])) {
            throw new NotFoundException("Entry id '" . $id . "' not found in container");
        }

        return $this->registry[$id];
    }
1173845
public static function get($storage, $key)
    {
        $keys	= explode('.', $key);

        foreach($keys as $key)
            $storage	= &$storage[$key];

        return $storage;
    }
430537
public function get($key) {
		$entry = null;

		if (isset($this->items[$key])) {
			$entry = $this->items[$key];
		} else {
			$data = $this->store->get($key);
			if ($data) {
				$entry = unserialize($data);
			}
		}

		if (!$entry) {
			return $entry;
		}


		// if the expire time is in the future
		if ($entry->expireAt > time()) {
			return unserialize($entry->value);
		}


		// if we got to here, we need to expire the value
		$this->expire($key);
		return null;
	}
1237523
public function findFirstByKey($key)
    {
        if ($this->useSoftDeletes) {
            return $this->repository
                ->withTrashed()
                ->where($this->repository->getRouteKeyName(), $key)
                ->first();
        }

        return $this->repository
            ->findBy($this->repository->getRouteKeyName(), $key);
    }
669209
public function arrayAccessByKey($key)
    {
        if (! isset($this->nameLookupTable[$key])) {
            return null;
        }

        if (isset($this->items[$this->nameLookupTable[$key]])) {
            return $this->items[$this->nameLookupTable[$key]];
        }

        return null;
    }
650115
public function retrieve(string $key)
    {
        $token = null;

        $storageInstance = $this->getRepository();

        $token = $storageInstance->{$key}?? null;

        return $token;
    }
311782
public function search($key)
    {
        $binarySearch = new BinarySearch($this);
        $result = $binarySearch->search($key);
        if (\is_null($result) || $result->getKey() != $key) {
            return null;
            
        }
        return $result;
    }