Extract the table of "var=>val" arguments pairs from a slashed route

@param array|string $arguments (passed and transformed by reference)
189677
protected function _extractSegments(&$arguments)
    {
        if (is_string($arguments)) $this->_extractArguments($arguments);
        foreach ($arguments as $var=>$val) {
            if (empty($val) && strpos($var, '/')!==false) {
                $parts = explode('/', $var);
                unset($arguments[$var]);
                $index = null;
                foreach ($parts as $part) {
                    if (is_null($index)) {
                        $index = $part;
                    } else {
                        $arguments[$index] = $part;
                        $index = null;
                    }
                }
            }
        }
    }
41140
public function prefixValues(array $arguments, $prefix)
    {
        $skip = ['id', 'ID'];

        return array_map(function ($key) use ($prefix, $skip) {
            if (in_array($key, $skip)) {
                return $key;
            }

            return "{$prefix}{$key}";
        }, $arguments);
    }
181370
private function extract(string $method, array $arguments)
    {
        try {
            $serializedArguments = serialize($arguments);
        } catch (\Exception $exception) {
            // If arguments are not serializable, skip the cache
            return $this->propertyInfoExtractor->{$method}(...$arguments);
        }

        // Calling rawurlencode escapes special characters not allowed in PSR-6's keys
        $encodedMethod = \rawurlencode($method);
        if (\array_key_exists($encodedMethod, $this->arrayCache) && \array_key_exists($serializedArguments, $this->arrayCache[$encodedMethod])) {
            return $this->arrayCache[$encodedMethod][$serializedArguments];
        }

        $item = $this->cacheItemPool->getItem($encodedMethod);

        $data = $item->get();
        if ($item->isHit()) {
            $this->arrayCache[$encodedMethod] = $data[$encodedMethod];
            // Only match if the specific arguments have been cached.
            if (\array_key_exists($serializedArguments, $data[$encodedMethod])) {
                return $this->arrayCache[$encodedMethod][$serializedArguments];
            }
        }

        // It's possible that the method has been called, but with different
        // arguments, in which case $data will already be initialized.
        if (!$data) {
            $data = [];
        }

        $value = $this->propertyInfoExtractor->{$method}(...$arguments);
        $data[$encodedMethod][$serializedArguments] = $value;
        $this->arrayCache[$encodedMethod][$serializedArguments] = $value;
        $item->set($data);
        $this->cacheItemPool->save($item);

        return $this->arrayCache[$encodedMethod][$serializedArguments];
    }
25801
public function _parse($args)
    {
        $this->_values = [];
        $this->_options = [];

        if (in_array(end($args), ['', '-', '--'], true)) {
            array_pop($args);
        }

        while ($args) {
            $o = array_shift($args);
            if ($o[0] !== '-') {
                $this->_values[] = $o;
                continue;
            }

            if (preg_match('#^-((\w)|-([\w-_]+))=(.*)$#', $o, $match)) {
                $this->_options[$match[2]] = $match[4];
                continue;
            }

            if ($o[1] === '-') {
                if (strlen($o) < 3) {
                    throw new ArgumentsException(['long `:option` option is too short', 'option' => $o]);
                }

                $this->_options[substr($o, 2)] = !$args || $args[0] === '-' ? 1 : array_shift($args);
            } elseif (strlen($o) > 2) {
                if (!$args || $args[0][0] === '-') {
                    /** @noinspection PhpParamsInspection */
                    foreach (str_split(substr($o, 1), 1) as $c) {
                        $this->_options[$c] = 1;
                    }
                } else {
                    $this->_options[substr($o, 1)] = array_shift($args);
                }
            } else {
                $this->_options[substr($o, 1)] = !$args || $args[0] === '-' ? 1 : array_shift($args);
            }
        }

        return $this;
    }
540098
public function actionIndex(...$arguments)
    {
        if ($this->getContext()->getInput()->getHeader('x-rpc') && isset($arguments[0])) {
            $this->parseHttpArgument($arguments);
            yield $this->runMethod();
        } else {
            $this->outputJson([], 400);
        }
    }
1204868
function parseDSN_args($args) {
     	$retn = array();
     	foreach(explode("&",$args) as $arg) {
     	 	list($key,$val) = explode("=",trim($arg));
     	 	$retn[$key] = $val;
     	 	unset($key,$val);
     	}
     	return $retn;
    }
222924
public function linksToCurrentPage(array $arguments) {
        return
            URL::current() == URL::route($this->action->getName(), $this->action->getRouteParameters($arguments)) &&
            Request::method() == $this->action->getMethod();
    }
1011716
private function extractVariableRouteParts(string $route) : array
    {
        $matches = [];
        preg_match_all(
            self::VARIABLE_REGEX,
            $route,
            $matches,
            PREG_OFFSET_CAPTURE | PREG_SET_ORDER
        );

        return $matches;
    }
532206
protected function __linkWhere($arguments)
	{
		if(isset($arguments[1]))
		{
			$str = reset($arguments);
			array_shift($arguments);
			$this->operationOption['where'][] = array(
				'__str'		=>	$str,
				'__values'	=>	$arguments,
			);
		}
		else
		{
			$this->operationOption['where'][] = $arguments[0];
		}
	}
1077820
private static function lti_extract_parameters($parameters) {

        $params = array();
        foreach ($parameters as $parameter) {
            if (isset($parameter->variable)) {
                $value = '$' . $parameter->variable;
            } else {
                $value = $parameter->fixed;
                if (strlen($value) > 0) {
                    $first = substr($value, 0, 1);
                    if (($first == '$') || ($first == '\\')) {
                        $value = '\\' . $value;
                    }
                }
            }
            $params[] = "{$parameter->name}={$value}";
        }

        return implode("\n", $params);

    }
949214
protected function buildUrlRequirements(array &$arguments)
    {
        $url = [];
        foreach ($this->requirements as $key => $regex) {
            $this->assertArgumentRequirement($key, $regex, $arguments);

            if (array_key_exists($key, $arguments) && isset($this->builders['segments']['{' . $key . '}'])) {
                $this->assertArgumentValue($key, $regex, $arguments[$key]);
                $url['{' . $key . '}'] = str_replace('{value}', $this->strip($arguments[$key]), $this->builders['segments']['{' . $key . '}']);
            } else {
                $url['{' . $key . '}'] = substr($this->requirements[$key], -1) == '+' && isset($this->arguments[$key]) ? $this->arguments[$key] : null;
            }

            unset($arguments[$key]);
        }

        return $url;
    }
723560
public static function convert(array $arguments)
    {
        if (!$arguments) {
            return [];
        }

        // always try convert the first argument to the field operand
        $field = self::toField(array_shift($arguments));

        if (!$arguments) {
            return [$field];
        }

        // always try convert the last argument to the value operand
        $value = self::toValue(array_pop($arguments));

        if (!$arguments) {
            return [$field, $value];
        }

        if (!self::isAllOperands($arguments)) {
            throw new NotConvertibleException('You passed arguments not all of which are operands.');
        }

        array_unshift($arguments, $field);
        array_push($arguments, $value);

        return $arguments;
    }
85443
private function _allocateArgs($arguments)
	{
		if (empty($arguments)) {
			return;
		}

		/* First argument is the variable to be debugged */
		$this->variable = $arguments[0];
		$this->variableType = gettype($this->variable);

		/* 
		 * The second and third argument can be either an integer representing
		 * the type, a string used as a message or an array containing multiple options
		 */
		for ($i=1; $i < 3; $i++) { 
			if (!isset($arguments[$i])) {
				return;
			}

			if (is_string($arguments[$i])) {
				$this->name = $arguments[$i];
			} elseif(is_int($arguments[$i])) {
				$this->type = X\THEDEBUG::$debugTypeMap[$arguments[$i]];
			} elseif(is_array($arguments[$i]) || is_object($arguments[$i])) {
				$this->setOptsByArray((array) $arguments[$i]);
			}
		}
		
		/* The fourth argument can be the back-trace offset */
		if (isset($arguments[3])) {
			if (is_int($arguments[3])) {
				$this->backTraceOffset = $arguments[3];
			}
		}
	}
1123316
protected function normalizeInput($arguments)
    {
        if (is_array($arguments[0])) {
            return $arguments[0];
        }

        if (count($arguments) == 2) {
            return [$arguments[0] => $arguments[1]];
        }

        throw new Exception('Try JavaScript::put(["foo" => "bar"])');
    }
241973
protected function parameterValues($parameters)
    {
        $values = array();
        foreach ($parameters as $value) {
            $values[] = is_array($value) ? $value['value'] : $value;
        }
        return $values;
    }
1155201
public function parseString(string $arguments, bool $strict = false) : array
    {
        $arguments = explode(' ', $arguments);

        return $this->parseArray($arguments, $strict);
    }
139206
protected function _translateArgs($args) {
		foreach ((array)$args as $k => $arg) {
			if (is_string($arg)) {
				$args[$k] = __d($this->validationDomain, $arg);
			}
		}
		return $args;
	}