protected function readPaging(Request $request): PagingInfo
    {
        $input = $request->only(PagingInfo::KEYS);
        if (isset($input[PAGE_SIZE])) {
            $pageSize = (int)$input[PAGE_SIZE];
            if ($pageSize <= 0) {
                $input[PAGE_SIZE] = config(API_PAGE_SIZE_MAX);
            }
            if ($pageSize > config(API_PAGE_SIZE_MAX)) {
                $input[PAGE_SIZE] = config(API_PAGE_SIZE_MAX);
            }
        }
        return new PagingInfo($input);
    }
protected function readPaging(Request $request): PagingInfo
    {
        $input = $request->only(PagingInfo::KEYS);
        if (isset($input[PAGE_SIZE])) {
            $pageSize = (int)$input[PAGE_SIZE];
            if ($pageSize <= 0) {
                $input[PAGE_SIZE] = config(API_PAGE_SIZE_MAX);
            }
            if ($pageSize > config(API_PAGE_SIZE_MAX)) {
                $input[PAGE_SIZE] = config(API_PAGE_SIZE_MAX);
            }
        }
        return new PagingInfo($input);
    }
protected function readPaging ( Request $ request ) : PagingInfo { $ input = $ request -> only ( PagingInfo :: KEYS ) ; if ( isset ( $ input [ PAGE_SIZE ] ) ) { $ pageSize = ( int ) $ input [ PAGE_SIZE ] ; if ( $ pageSize <= 0 ) { $ input [ PAGE_SIZE ] = config ( API_PAGE_SIZE_MAX ) ; } if ( $ pageSize > config ( API_PAGE_SIZE_MAX ) ) { $ input [ PAGE_SIZE ] = config ( API_PAGE_SIZE_MAX ) ; } } return new PagingInfo ( $ input ) ; }
Read request paging data

If checking value specified, allows only integer positive value equal or less 100 (setting).
If value not specified, take the default value from settings.

@param Request $request raw request data
@return PagingInfo
Read request paging data