Finds an entry of the container by its identifier and returns it.
Supports dot key notation.

@param string $key
@return mixed
976794
public function get($key)
    {
        expect_type($key, 'string');

        $value = DotKey::on($this)->get($key);

        if (!isset($value)) {
            throw new NotFoundException("Config setting '$key' not found");
        }

        return $value;
    }
584859
public function get(string $key, $default = null)
    {
        if (array_key_exists($key, $this->input)) {
            return $this->input[$key];
        } elseif (array_key_exists($key, $this->cache)) {
            return $this->cache[$key];
        }

        // No dot, then not nested keys. We already tried that key and were not lucky.
        if (false === strpos($key, '.')) {
            return $this->default($default);
        }

        try {
            $return = $this->find($this->input, $key);
        } catch (\Exception $e) {
            $return = $this->default($default);
        }
        return $return;
    }
877689
public function findByKey($key)
    {
        $document = $this->collection->findOne(['_id' => $key]);

        return $this->hydrateEntity($document);
    }
449226
public function get(string $key)
    {
        if (!isset($this->data[$this->activeAssetSourceIdentifier])) {
            $this->initializeData($this->activeAssetSourceIdentifier);
        }
        return $this->data[$this->activeAssetSourceIdentifier][$key] ?? null;
    }
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;
    }
445187
public function _get($key)
    {
        $value = parent::_get($key);

        try {
            return $this->_dereferenceTokens($value);
        } catch (RuntimeException $e) {
            throw $this->_createContainerException($this->__('Could not de-reference tokens'), null, $e, $this);
        }
    }
261462
protected function get($key)
    {
        $this->checkForNonEmptyKey($key);
        if (!$this->settingsHaveBeenRetrieved) {
            $this->retrieveSettings();
        }
        if (!isset($this->cachedSettings[$key])) {
            return null;
        }

        return $this->cachedSettings[$key];
    }
411331
private function find($id)
    {
        if (! isset($this->registry[$id])) {
            throw new NotFoundException("Entry id '" . $id . "' not found in container");
        }

        return $this->registry[$id];
    }
862497
protected function fetchKey($key)
    {
        if (str_contains($key, '.'))
        {
            $keys = explode('.', $key);
            $search = array_except($keys, 0);

            return array(array_get($keys, 0), implode('.', $search));
        }

        return array($key, null);
    }
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;
    }
1002567
public function get($key)
    {
        $value = $this->apc->get($this->prefix.$key);

        if ($value !== false) {
            return $value;
        }
    }
920880
public function find($key)
    {
        $path = $this->finder->find($name);

        if ($path && !in_array($path, $this->paths)) {
            array_unshift($this->paths, $path);
        }

        return parent::find($name);
    }
1199367
private function lookupKey($key)
    {
        foreach ($this->pairs as $pair) {
            if ($this->keysAreEqual($pair->key, $key)) {
                return $pair;
            }
        }
    }
185912
function findKey( $key )
    {
        $num = $this->keyPick( $key );
        if ( $num >=0 and $num <= count( $this->Handlers ) )
        {
            $handler = $this->Handlers[$num];
            return $handler->findKey( $key );
        }
        $retValue = null;
        return $retValue;
    }
32154
public function getId($key = null)
    {
        return (isset($this->index[$key]) && !is_null($key)) ?
            $this->index[$key] :
            $this->index[$this->getKeyName()];
    }
713501
public function getKey($key)
    {
        $tokens = explode('.', $key);


        $first = array_shift($tokens);
        $first = str_replace('POINT', '.', $first);

        $that = $this;

        $value = $that[$first];

        foreach($tokens as $k) {
            $k = str_replace('POINT', '.', $k);
            if (false === isset($value[$k])) {
                return null;
            }
            $value = $value[$k];
        }

        return $value;
    }
1031909
public static function get($key)
    {
        $noInitModel = static::buildNoInitModel();
        $model = static::find()->where([$noInitModel->idAttribute => $key])->one();
        if ($model) {
            return $model->value;
        }
        return null;
    }