public static function input(string $type)
    {
        $self = self::$input[$type] ?? new self;

        self::$input[$type] = $self;

        switch (strtoupper($type)) {
            case 'GET':
            case 'POST':
                $self->params = filter_input_array(constant('INPUT_' . $type)) ?? [];
                break;
            case 'PUT':
            case 'DELETE':
                $self->params = self::getParsedInput();
                break;
        }

        return function ($key = null) use ($self) {
            $self->key = $key;

            return $self;
        };
    }
public static function input(string $type)
    {
        $self = self::$input[$type] ?? new self;

        self::$input[$type] = $self;

        switch (strtoupper($type)) {
            case 'GET':
            case 'POST':
                $self->params = filter_input_array(constant('INPUT_' . $type)) ?? [];
                break;
            case 'PUT':
            case 'DELETE':
                $self->params = self::getParsedInput();
                break;
        }

        return function ($key = null) use ($self) {
            $self->key = $key;

            return $self;
        };
    }
public static function input ( string $ type ) { $ self = self :: $ input [ $ type ] ?? new self ; self :: $ input [ $ type ] = $ self ; switch ( strtoupper ( $ type ) ) { case 'GET' : case 'POST' : $ self -> params = filter_input_array ( constant ( 'INPUT_' . $ type ) ) ?? [ ] ; break ; case 'PUT' : case 'DELETE' : $ self -> params = self :: getParsedInput ( ) ; break ; } return function ( $ key = null ) use ( $ self ) { $ self -> key = $ key ; return $ self ; } ; }
Get request params.

@since 2.0.0

@return anonymous function
Get request params .