Fetches a node from this collection.

@param string|int $key The key of the node we want to find.
@param int $type One of navigation_node::TYPE_*.
@return navigation_node|null
770569
public function get($key, $type=null) {
        if ($type !== null) {
            // If the type is known then we can simply check and fetch
            if (!empty($this->orderedcollection[$type][$key])) {
                return $this->orderedcollection[$type][$key];
            }
        } else {
            // Because we don't know the type we look in the progressive array
            foreach ($this->collection as $node) {
                if ($node->key === $key) {
                    return $node;
                }
            }
        }
        return false;
    }
1014523
public function get($key)
    {
        if (array_key_exists($key, $this->container)) {
            return $this->container[$key];
        }

        return null;
    }
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;
    }
1014449
public function get($key, $type = self::NORMAL, $default = null)
    {
        $typeConfig = $this->getTypeConfig($type);

        if (array_key_exists($key, $typeConfig)) {
            return $typeConfig[$key];
        }

        return $default;
    }
905487
public function get($key)
    {
        list($namespace, $group, $item) = $this->resolver->parseKey($key);

        $collection = $this->getCollection($group, $namespace);

        $items = $this->load($group, $namespace, $collection);
        
        return $this->resolver->resolveKey($item, $items);
    }
938525
public function get($key)
    {
        if (array_key_exists($key, $this->_map)) {
            return $this->_map[$key];
        }

        return null;

    }
358769
public function getObject($key)
    {
        try {
            $result = $this->get(self::OBJECT, $key);
            if (!settype($result, 'object')) {
                return null;
            }
        } catch (\Exception $e) {
            return null;
        }
        return $result;
    }
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;
    }
98181
protected function getNested($key)
	{
		$segments = explode('.', $key);
		$data = $this->getMenu(array_shift($segments));
		if (!$data) return null;

		foreach ($segments as $key) {
			if ($data instanceof Nodes\SubmenuNode) {
				$data = $data->getSubmenu();
			}

			if ($data instanceof Collection) {
				$data = $data->getItem($key);
			} else {
				return null;
			}
		}

		return $data;
	}
1182764
public static function get(array $root, string $key){
        $nodes  = self::getMatchedNodes($root, $key);

        if(empty($nodes)){
            return null;
        }else if(count($nodes) === 1){
            return array_pop($nodes);
        }

        return $nodes;
    }
1258172
protected static function passed($type, $key = null, $default = null)
    {
        return Session::get(
            $type . ($key !== null ? '.' . $key : ''),
            $key === null && $default === null ? [] : $default
        );
    }
1255240
public function getTarget($key)
    {
        $unit = $this->searchForId($key);

        $target = $this->getXPathFirstItem('xliff:target', $unit);
        if ($target && $target->firstChild) {
            return $target->firstChild->nodeValue;
        }

        return null;
    }
97517
public function getSortedNodesBuilder($key = null, $direction = null, $type = null, $limit = null, $locale = null)
    {
        $builder = PublishedNode::translatedIn($locale)
            ->groupBy('nodes.id');

        if ($type)
        {
            $builder->withType($type);
        }

        if ($limit)
        {
            $builder->limit($limit);
        }

        return $builder->sortable($key, $direction);
    }
188788
protected function nodeGet($key, ?RedBlackNode $node): ?RedBlackNode
    {
        while ($node !== null) {
            $comp = $this->comparator->compare($key, $node->key());
            if ($comp < 0) {
                $node = $node->left();
            } elseif ($comp > 0) {
                $node = $node->right();
            } else {
                return $node;
            }
        }

        return null;
    }
665904
public function get($key = null)
    {
        if (null === $key) {
            return $this->get;
        }

        return isset($this->get[$key]) ? $this->get[$key] : null;
    }
892686
public function get( $key )
	{
		if ( isset($this->postData[ $key ]) )
		{
			return $this->postData[ $key ];
		}
		else
		{
			return null;
		}
	}
281408
public function get(string $key)
    {
        if (!isset($this->data[$key])) {
            return null;
        }

        $struct = $this->data[$key];

        if ($struct->ttl !== null) {
            $expire = \time() + $struct->ttl;
            if ($struct->expire < $expire) {
                $struct->expire = $expire;
                $this->queue->insert([$key, $struct->expire], -$struct->expire);
            }
        }

        return $struct->data;
    }