src/Resource/MoipResource.php
public function generateListPath(Pagination $pagination = null, Filters $filters = null, $params = [])
    {
        $queryParams = [];

        if (!is_null($pagination)) {
            if ($pagination->getLimit() != 0) {
                $queryParams['limit'] = $pagination->getLimit();
            }

            if ($pagination->getOffset() >= 0) {
                $queryParams['offset'] = $pagination->getOffset();
            }
        }

        if (!is_null($filters)) {
            $queryParams['filters'] = $filters->__toString();
        }

        if (!empty($params)) {
            $queryParams = array_merge($queryParams, $params);
        }

        if (!empty($queryParams)) {
            return sprintf('/%s/%s?%s', self::VERSION, static::PATH, http_build_query($queryParams));
        }

        return sprintf('/%s/%s', self::VERSION, static::PATH);
    }
public function generateListPath(Pagination $pagination = null, Filters $filters = null, $params = [])
    {
        $queryParams = [];

        if (!is_null($pagination)) {
            if ($pagination->getLimit() != 0) {
                $queryParams['limit'] = $pagination->getLimit();
            }

            if ($pagination->getOffset() >= 0) {
                $queryParams['offset'] = $pagination->getOffset();
            }
        }

        if (!is_null($filters)) {
            $queryParams['filters'] = $filters->__toString();
        }

        if (!empty($params)) {
            $queryParams = array_merge($queryParams, $params);
        }

        if (!empty($queryParams)) {
            return sprintf('/%s/%s?%s', self::VERSION, static::PATH, http_build_query($queryParams));
        }

        return sprintf('/%s/%s', self::VERSION, static::PATH);
    }
public function generateListPath ( Pagination $ pagination = null , Filters $ filters = null , $ params = [ ] ) { $ queryParams = [ ] ; if ( ! is_null ( $ pagination ) ) { if ( $ pagination -> getLimit ( ) != 0 ) { $ queryParams [ 'limit' ] = $ pagination -> getLimit ( ) ; } if ( $ pagination -> getOffset ( ) >= 0 ) { $ queryParams [ 'offset' ] = $ pagination -> getOffset ( ) ; } } if ( ! is_null ( $ filters ) ) { $ queryParams [ 'filters' ] = $ filters -> __toString ( ) ; } if ( ! empty ( $ params ) ) { $ queryParams = array_merge ( $ queryParams , $ params ) ; } if ( ! empty ( $ queryParams ) ) { return sprintf ( '/%s/%s?%s' , self :: VERSION , static :: PATH , http_build_query ( $ queryParams ) ) ; } return sprintf ( '/%s/%s' , self :: VERSION , static :: PATH ) ; }
Generate URL to request a get list.

@param Pagination $pagination
@param Filters    $filters
@param array      $params

@return string
Generate URL to request a get list .