Returns a single capture group matched with `match()` based on its index or name.

@param string|int $key the index or name of the capturing group.

@return string|null the matched string part.
196341
public function getMatch($key)
    {
        if (!$this->lastMatchResult) {
            $this->throwException(
                "Failed to get match $key: No match result found. Use match first"
            );
        }

        return isset($this->lastMatchResult[$key])
            ? $this->lastMatchResult[$key]
            : null;
    }
1184358
public function getFieldByKey($key)
    {
        foreach ($this->groups as $group) {
            foreach ($group->getFields() as $field) {
                if ($field->getKey() == $key) {
                    return $field;
                }
            }
        }
    }
475436
protected function parseArrayKey($key)
    {
        preg_match(static::ARRAY_KEY_PATTERN, $key, $matches);
        return (isset($matches['array_key']) ? $matches['array_key'] : null);
    }
1077124
public function get(string $key)
    {
        $slug = $this->splitKey($key);

        if (is_string($slug)) {
            if (isset($this[$slug])) {
                return $this[$slug];
            }
            return null;
        }

        $array = $this->toArray();

        foreach ($slug as $search) {
            if (isset($array[$search])) {
                $array = $array[$search];
            } else {
                return;
            }
        }

        return $array;
    }
575959
protected function retrieve($key)
    {
        $result = $this->apcu
            ? apcu_fetch($this->key . $key, $success)
            : apc_fetch($this->key . $key, $success)
        ;
        return ($success === true) ? $result : null;
    }
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;
    }
216085
function group($key = null)
    {
        if (empty($key)) $key = sizeof($this->children);
        if (!isset($this->children[$key])){
            $this->children[$key] = new Trace($key, null);
        }
        return $this->children[$key];
    }
139158
protected function get($key)
    {
        return isset($this->errors[$key]) ? $this->errors[$key] : null;
    }
104701
public function getKey($key)
    {
        $key = strtolower($key);
        if (!isset($this->keys[$key])) {
            return null;
        }
        return (string)$this->keys[$key];
    }
780257
public function first($key)
    {
        if ($this->has($key)) {
            $err = $this->_errors[$key];
            if (is_array($err)) {
                for ($i = 0; $i < count($err); $i++) {
                    if (!empty($err[$i])) {
                        return $err[$i];
                    }
                }
            } else {
                return $err;
            }
        }

        return ''; // return empty string since no key found to prevent errors
    }
288938
public function offsetGet($key)
    {
        $i = -1;
        foreach ($this->hash as $obj) {
            if ($key === ++$i) {
                return $this->hash[$obj];
            }
        }

        return null;
    }
1285738
public function find($key)
    {
        if (isset($this->payload[$key])) {
            return $this->payload[$key];
        }

        return null;
    }
235636
protected function _getMatchAll($key = 0) {
		foreach ($this->_regex['match_all'] as $name => $regex) {
			if (is_array($regex)) {
				$this->_setFile($name, $regex, $key);
			} else {
				$match = $this->_filterAll($regex, $this->_html, 1, $name);
				$this->_output[$key][$name] = $match;
			}
		}
	}
115955
public function get(string $key): string
    {
        return $this->handle->hGet($this->name, $key);
    }
1221067
public function get($key)
    {
        $filename = $this->getKeyCode($key);

        if ($this->fileExists($filename)) {
            $value = $this->read($filename);
        } else {
            return null;
        }

        return json_decode($value, true);
    }
326629
public function resolve($key)
    {
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                $key[$k] = $this->resolve($v);
            }
        } elseif (is_string($key)) {
            $matches = array();
            preg_match_all('/{[\s]*?([^\s]+)[\s]*?}/i', $key, $matches, PREG_SET_ORDER);
            foreach ($matches as $match) {
                if (array_key_exists($match[1], $this->bindings)) {
                    $key = preg_replace('/' . $match[0] . '/', $this->bindings[$match[1]], $key, 1);
                }
            }
        }

        return $key;
    }
547580
public function offsetGet($key)
    {
        if (($index = $this->keysIndices[self::keyString($key)] ?? null) === null) {
            return null;
        }

        return $this->values[$index];
    }