src/Uploadcare/Api.php
private function __preparePagedParams($data, $reverse, $resultArr)
    {
        $nextParamsArr = parse_url($data->next);
        $prevParamsArr = parse_url($data->previous);
        $nextParamsArr = array_replace(array('query' => null), $nextParamsArr);
        $prevParamsArr = array_replace(array('query' => null), $prevParamsArr);

        parse_str(parse_url(!$reverse ? $data->next : $data->previous, PHP_URL_QUERY), $params);

        if ($reverse) {
            $resultArr = array_reverse($resultArr);
        }

        return array(
            'nextParams' => $reverse ? $prevParamsArr : $nextParamsArr,
            'prevParams' => !$reverse ? $prevParamsArr : $nextParamsArr,
            'params' => $params,
            'data' => $resultArr,
        );
    }
private function __preparePagedParams($data, $reverse, $resultArr)
    {
        $nextParamsArr = parse_url($data->next);
        $prevParamsArr = parse_url($data->previous);
        $nextParamsArr = array_replace(array('query' => null), $nextParamsArr);
        $prevParamsArr = array_replace(array('query' => null), $prevParamsArr);

        parse_str(parse_url(!$reverse ? $data->next : $data->previous, PHP_URL_QUERY), $params);

        if ($reverse) {
            $resultArr = array_reverse($resultArr);
        }

        return array(
            'nextParams' => $reverse ? $prevParamsArr : $nextParamsArr,
            'prevParams' => !$reverse ? $prevParamsArr : $nextParamsArr,
            'params' => $params,
            'data' => $resultArr,
        );
    }
private function __preparePagedParams ( $ data , $ reverse , $ resultArr ) { $ nextParamsArr = parse_url ( $ data -> next ) ; $ prevParamsArr = parse_url ( $ data -> previous ) ; $ nextParamsArr = array_replace ( array ( 'query' => null ) , $ nextParamsArr ) ; $ prevParamsArr = array_replace ( array ( 'query' => null ) , $ prevParamsArr ) ; parse_str ( parse_url ( ! $ reverse ? $ data -> next : $ data -> previous , PHP_URL_QUERY ) , $ params ) ; if ( $ reverse ) { $ resultArr = array_reverse ( $ resultArr ) ; } return array ( 'nextParams' => $ reverse ? $ prevParamsArr : $ nextParamsArr , 'prevParams' => ! $ reverse ? $ prevParamsArr : $ nextParamsArr , 'params' => $ params , 'data' => $ resultArr , ) ; }
Prepares paged params array from chunk request result.

@param object $data
@param boolean $reverse
@param array $resultArr
@return array
Prepares paged params array from chunk request result .