protected function getInput($request, $in, $name)
    {
        switch ($in)
        {
            case 'header':
                return $request->header($name);

            case 'query':
                return $request->query($name);

            case 'path':
                return $request->route($name);

            default:
                throw new \InvalidArgumentException(
                    get_class($this) . " doesn't know how to handle '" . $in . "' parameters"
                );
        }
    }