public function invoke(FilterableServiceInterface $service, $perPageCount, array $parameters = array())
    {
        $page = $this->getPageNumber();
        $sort = $this->getSortingColumn();
        $desc = $this->getDesc();

        $records = $service->filter($this->getData(), $page, $perPageCount, $sort, $desc, $parameters);

        // Tweak pagination if available
        if (method_exists($service, 'getPaginator')) {
            $paginator = $service->getPaginator();

            if ($paginator instanceof PaginatorInterface) {
                $paginator->setUrl($this->getPaginationUrl($page, $sort, $desc));
            }
        }

        return $records;
    }