Retrieves a list of Bulk Send Jobs for account

@param  integer $page
@param  integer $page_size
@return BulkSendJobList
@throws BaseException
493168
public function getBulkSendJobs($page = 1, $page_size = 20)
    {
        $response = $this->rest->get(static::BULK_SEND_JOB_LIST_PATH, array('page' => $page, 'page_size' => $page_size));

        $this->checkResponse($response);

        $list = new BulkSendJobList($response);

        if ($page > $list->getNumPages()) {
            throw new Error('page_not_found', 'Page not found');
        }

        return $list;
    }
1188917
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllAddresses(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllAddresses();
        }
    }
303145
public static ResourceList<Application> list(final int page, final int size) throws IOException {
    	
    	final BandwidthClient client = BandwidthClient.getInstance();
        
        return list(client, page, size);
    }
1084464
public function getAll($pageSize = 200, $page = 1)
    {
        return $this->rest->get($this->action, [
            'pageSize' => $pageSize,
            'page' => $page
        ]);
    }
68087
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllTableRateShippings(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllTableRateShippings();
        }
    }
243230
public static ResourceList<PhoneNumber> list(final int page, final int size) throws IOException {
        return list(BandwidthClient.getInstance(), page, size);
    }
86539
public function paginate($per_page = 15, $page = null, $page_name = 'page') {
        $page = $page ?: Paginator::resolveCurrentPage($page_name);

        $results = ($total = $this->count()) ? $this->forPage($page, $per_page) : $this->all();

        return $this->paginator($results, $total, $per_page, $page, [
            'path'      => Paginator::resolveCurrentPath(),
            'pageName'  => $page_name,
        ]);
    }
661941
private static function getInstanceForPage(TdbCmsTplPage $page, $baseQuery)
    {
        /** @var CacheInterface $cache */
        $cache = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_core.cache');

        $cacheKey = $cache->getKey(array(
            'class' => __CLASS__,
            'method' => 'getInstanceForPage',
            'pageId' => $page->id,
        ));
        $instance = $cache->get($cacheKey);
        if (null === $instance) {
            $instance = false;

            $query = "SELECT pkg_shop_listfilter_module_config.*
                    FROM cms_tpl_module_instance
              INNER JOIN cms_tpl_module ON cms_tpl_module_instance.cms_tpl_module_id = cms_tpl_module.id
              INNER JOIN cms_tpl_page_cms_master_pagedef_spot ON cms_tpl_module_instance.id = cms_tpl_page_cms_master_pagedef_spot.cms_tpl_module_instance_id
              INNER JOIN pkg_shop_listfilter_module_config ON cms_tpl_module_instance.id = pkg_shop_listfilter_module_config.cms_tpl_module_instance_id
                   WHERE cms_tpl_page_cms_master_pagedef_spot.cms_tpl_page_id = '{$page->id}'
                     AND pkg_shop_listfilter_module_config.pkg_shop_listfilter_id != ''

        ";

            // we are looking for a module that has a listfilter set. in the future we might change this to a more robust way of identifying the right module. (eg. via generic meta data)
            $filterConfig = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query));
            if ($filterConfig) {
                $instance = TdbPkgShopListfilter::GetNewInstance($filterConfig['pkg_shop_listfilter_id']);
                if ('' !== $filterConfig['filter_parameter']) {
                    $instance->setStaticFilter($filterConfig['filter_parameter']);
                }
            }

            $cache->set($cacheKey, $instance, array(array('table' => 'shop', 'id' => null), array('table' => 'cms_tpl_page', 'id' => $page->id), array('table' => 'pkg_shop_listfilter', 'id' => null)));
        }

        if (false === $instance) { // check if the category sets a filter
            $instance = null;
            /** @var $shopService \ChameleonSystem\ShopBundle\Interfaces\ShopServiceInterface */
            $shopService = \ChameleonSystem\CoreBundle\ServiceLocator::get('chameleon_system_shop.shop_service');
            $activeCategory = $shopService->getActiveCategory();
            if (null !== $activeCategory) {
                $instance = self::getInstanceForCategory($activeCategory, $shopService->getActiveShop());
            }
        }

        if (null === $instance) {
            $instance = TdbPkgShopListfilter::GetNewInstance(TdbShop::GetInstance()->fieldPkgShopListfilterPostsearchId);
        }

        $instance->pushStaticFilterToRequest();

        $instance->setArticleListQuery($baseQuery);

        return $instance;
    }
542005
public function getPagedResults($limit = 25, $page = 0)
    {
        $template = self::DQL_ALL;
        $dql = sprintf($template, UserPermission::class, User::class);

        return $this->getPaginator($dql, $limit, $page, []);
    }
714760
public function get_groups($page_size = nil, $page = 1){
		$client = new \GuzzleHttp\Client();

		$response = $client->get($this->api_endpoint.'issuer/all_groups?page_size=' . $page_size . '&page=' . $page, array('headers' =>  array('Authorization' => 'Token token="'.$this->getAPIKey().'"')));

		$result = json_decode($response->getBody());
		return $result;
	}
157891
public function process(int $page, int $limit, array $filters = [], array $orders = []): Data
    {
        // process filters
        $this->applyFilters($filters);

        // process orders
        $this->applyOrders($orders);

        $data = $this->getSource();

        $total = \count($data);

        // process pages
        $data = \array_slice($data, $limit * ($page - 1), $limit);

        $gridData = new Data($data);
        $gridData->setTotal($total);
        return $gridData;
    }
453284
public static <T> List<T> subList(final List<T> list, int pageSize, int page) {

		if (pageSize <= 0 || page == 0) {

			return Collections.EMPTY_LIST;
		}

		int size        = list.size();

		int fromIndex   = page > 0
		     ? (page - 1) * pageSize
		     : size + (page * pageSize);

		int toIndex = fromIndex + pageSize;

		int finalFromIndex = Math.max(0, fromIndex);
		int finalToIndex   =  Math.min(size, Math.max(0, toIndex));

		// prevent fromIndex to be greater than toIndex
		if (finalFromIndex > finalToIndex) {
			finalFromIndex = finalToIndex;
		}

		try {
			return list.subList(finalFromIndex, finalToIndex);

		} catch (Throwable t) {

			logger.warn("Invalid range for sublist in paging, pageSize {}, page {}: {}", new Object[] {
				pageSize,
				page,
				t.getMessage()
			});
		}

		return Collections.EMPTY_LIST;

	}
1126290
static public function paginate($page, $per_page)
    {
        $query = self::createRelation();
        return $query->paginate($page, $per_page);
    }
538084
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllStripeGateways(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllStripeGateways();
        }
    }
1329448
public function branchList(
        $criteria = array(),
        $page = null,
        $pageSize = null,
        array $additionalFields = array()
    ) {
        return $this->getInternalList(
            'catalog/branch/list',
            'Branch',
            array_merge(
                $criteria instanceof BranchSearchCriteria ? $criteria->toArray() : $criteria,
                array(
                    'page' => $page,
                    'page_size' => $pageSize,
                    'fields' => self::getArray($additionalFields),
                )
            )
        );
    }
821522
public VoiceCallResponseList listAllVoiceCalls(Integer page, Integer pageSize) throws GeneralException, UnauthorizedException {
        String url = String.format("%s%s", VOICE_CALLS_BASE_URL, VOICECALLSPATH);
        return messageBirdService.requestList(url, new PagedPaging(page, pageSize), VoiceCallResponseList.class);
    }
372873
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllPaymentSources(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllPaymentSources();
        }
    }