src/Leevel/Http/Request.php
public function getItem(string $source, ?string $key, $defaults)
    {
        if (null === $key) {
            return $this->{$source}->all();
        }

        return $this->{$source}->get($key, $defaults);
    }
public function getItem(string $source, ?string $key, $defaults)
    {
        if (null === $key) {
            return $this->{$source}->all();
        }

        return $this->{$source}->get($key, $defaults);
    }
取回数据项.

@param string            $source
@param string            $key
@param null|array|string $defaults

@return array|string