protected function bindParts($vars, $type, ServerRequestInterface $request, array $parts)
    {
        $values = [];
        
        foreach ($vars as $key => $var) {
            $part = null;
            
            $bound =
                $this->bindPartObject($var, $part) ||
                $this->bindPartArray($var, $request, $parts, $part) ||
                $this->bindPartVar($var, $type, $request, $parts, $part) ||
                $this->bindPartConcat($var, $request, $parts, $part) ||
                $this->bindPartValue($var, $part);
            
            if (!$bound) continue;
            
            if ($type === 'assoc') {
                $values[$key] = $part[0];
            } else {
                $values = array_merge($values, $part);
            }
        }

        return $values;
    }