src/Router/Routes/RouteBinding.php
protected function bind($vars, ServerRequestInterface $request, array $parts)
    {
        $type = is_array($vars) && array_keys($vars) === array_keys(array_keys($vars)) ? 'numeric' : 'assoc';

        $values = $this->bindParts($vars, $type, $request, $parts);

        if ($vars instanceof Route) {
            $class = get_class($vars);
            $values = new $class($values);
        } elseif (is_object($vars) && $type === 'assoc') {
            $values = (object)$values;
        }
        
        return $values;
    }
protected function bind($vars, ServerRequestInterface $request, array $parts)
    {
        $type = is_array($vars) && array_keys($vars) === array_keys(array_keys($vars)) ? 'numeric' : 'assoc';

        $values = $this->bindParts($vars, $type, $request, $parts);

        if ($vars instanceof Route) {
            $class = get_class($vars);
            $values = new $class($values);
        } elseif (is_object($vars) && $type === 'assoc') {
            $values = (object)$values;
        }
        
        return $values;
    }
protected function bind ( $ vars , ServerRequestInterface $ request , array $ parts ) { $ type = is_array ( $ vars ) && array_keys ( $ vars ) === array_keys ( array_keys ( $ vars ) ) ? 'numeric' : 'assoc' ; $ values = $ this -> bindParts ( $ vars , $ type , $ request , $ parts ) ; if ( $ vars instanceof Route ) { $ class = get_class ( $ vars ) ; $ values = new $ class ( $ values ) ; } elseif ( is_object ( $ vars ) && $ type === 'assoc' ) { $ values = ( object ) $ values ; } return $ values ; }
Fill out the routes variables based on the url parts.

@param array|\stdClass         $vars     Route variables
@param ServerRequestInterface  $request
@param array                   $parts    URL parts
@return array
Fill out the routes variables based on the url parts .