protected function paginate($query, EncodingParametersInterface $parameters)
    {
        if (!$this->paging) {
            throw new RuntimeException('Paging is not supported on adapter: ' . get_class($this));
        }

        /**
         * Set the key name on the strategy, so it knows what column is being used
         * for the resource's ID.
         *
         * @todo 2.0 add `withQualifiedKeyName` to the paging strategy interface.
         */
        if (method_exists($this->paging, 'withQualifiedKeyName')) {
            $this->paging->withQualifiedKeyName($this->getQualifiedKeyName());
        }

        return $this->paging->paginate($query, $parameters);
    }
protected function paginate($query, EncodingParametersInterface $parameters)
    {
        if (!$this->paging) {
            throw new RuntimeException('Paging is not supported on adapter: ' . get_class($this));
        }

        /**
         * Set the key name on the strategy, so it knows what column is being used
         * for the resource's ID.
         *
         * @todo 2.0 add `withQualifiedKeyName` to the paging strategy interface.
         */
        if (method_exists($this->paging, 'withQualifiedKeyName')) {
            $this->paging->withQualifiedKeyName($this->getQualifiedKeyName());
        }

        return $this->paging->paginate($query, $parameters);
    }
protected function paginate ( $ query , EncodingParametersInterface $ parameters ) { if ( ! $ this -> paging ) { throw new RuntimeException ( 'Paging is not supported on adapter: ' . get_class ( $ this ) ) ; } /**
         * Set the key name on the strategy, so it knows what column is being used
         * for the resource's ID.
         *
         * @todo 2.0 add `withQualifiedKeyName` to the paging strategy interface.
         */ if ( method_exists ( $ this -> paging , 'withQualifiedKeyName' ) ) { $ this -> paging -> withQualifiedKeyName ( $ this -> getQualifiedKeyName ( ) ) ; } return $ this -> paging -> paginate ( $ query , $ parameters ) ; }
Return the result for a paginated query.

@param Builder $query
@param EncodingParametersInterface $parameters
@return PageInterface
Return the result for a paginated query .