Définit le nombre de résultats, pour calculer le nombre de pages

@param integer $resultsCount
558171
public function setResultsCount($resultsCount)
  {
    $this->resultsCount = $resultsCount;
    $this->nbPages = ceil($this->resultsCount / $this->maxByPage);
  }
12678
final protected function cache_query($sql, $result){
        if( isset($this->query_cache[$sql]) ){
            $this->query_cache[$sql] = $result;
        }elseif( count($this->query_cache) >= $this->cache_limit ){
            // Remove oldest cache
            array_shift($this->query_cache);
            // save query
            $this->query_cache[$sql] = $result;
        }
    }
172635
public function calculatePageParams($rowCount)
    {
        $this->totalPages = $this->pageSize > 0
            ? ceil($rowCount / $this->pageSize)
            : 1;
        if ($this->totalPages <= 0)
            $this->totalPages = 1;
        if ($this->pageNumber > $this->totalPages)
            $this->pageNumber = $this->totalPages;

        return $this;
    }
1165569
public static function printResult(
        OutputInterface $output,
        Result $result
    ) {
        self::printInfoMessage(
            $output,
            'Number of resources in index',
            $result->getTotalItems()
        );

        self::printInfoMessage(
            $output,
            'Number of hits',
            $result->getTotalHits()
        );

        $output->writeln('');

        foreach ($result->getItems() as $item) {
            $firstStringPosition = array_reduce($item->getAllMetadata(), function ($carry, $element) {
                return is_string($carry)
                    ? $carry
                    : (
                    is_string($element)
                        ? $element
                        : null
                    );
            }, null);

            self::printInfoMessage(
                $output,
                'x',
                sprintf('%s - %s',
                    $item->getUUID()->composeUUID(),
                    substr((string) $firstStringPosition, 0, 50)
                )
            );
        }
    }
627087
public void setResults(java.util.Collection<String> results) {
        if (results == null) {
            this.results = null;
            return;
        }

        this.results = new com.amazonaws.internal.SdkInternalList<String>(results);
    }
160383
public function addEagerConstraints(array $results)
    {
        $this->query->whereIn($this->getForeignKey(), $this->getKeysFromResults($results));
    }
1320113
public function processColumnListing($results)
    {
        return array_values(array_map(function ($result)
        {
            $result = (object) $result;

            return $result->column_name;

        }, $results));
    }
112759
private function iteratorFromResults(array $results)
    {
        $values = [];

        foreach ($results as $pair) {
            $entry = new IndexEntry();

            $entry->indexKey  = $pair->key;
            $entry->objectKey = $pair->value;

            $values[] = $entry;
        }

        return new ArrayIterator($values);
    }
671909
public function queryAndCount($resultName, $countName, QueryObjectInterface $queryObject, DisplayCriteriaInterface $displayCriteria = null)
    {
        list($result, $count) = $this->doQueryAndCount($queryObject, $displayCriteria);

        $this->data[$resultName] = $result;
        $this->data[$countName] = $count;

        return [$result, $count];
    }
717414
private function processResults($results)
    {
        $entries = $this->connection->getEntries($results);

        $objects = [];

        if (array_key_exists('count', $entries)) {
            for ($i = 0; $i < $entries['count']; $i++) {
                $entry = $this->newLdapEntry($entries[$i], $this->connection);

                $objects[] = $entry->getAttributes();
            }

            if (!empty($this->sortByField)) {
                return $this->processSortBy($objects);
            }
        }

        return $objects;
    }
357344
public function addNextPage(Result $result): ? string
    {
        $query = $result->getQuery();
        $urlParameters = $this->generateQueryUrlParameters($result);
        $page = $query->getPage();
        $nextPage = $page + 1;

        if ((($nextPage - 1) * $query->getSize()) > $result->getTotalHits()) {
            return null;
        }

        $urlParameters['page'] = $nextPage;

        return $this->createUrlByUrlParameters(
            $result,
            $urlParameters
        )['route'];
    }
589494
public function setResults($results)
    {
        // hydrate model
        foreach ($results as $entry) {
            /** @var EntityDataModel $model */
            $model = $this->getModel();
            $model->setEntityManager($this->getEntityManager());

            // check for json
            if (array_key_exists('[json]', $entry)) {
                $entry = json_decode($entry['[json]']);
            }

            $model = $this->populate($entry, $model);

            $this->collection[] = $model;
        }

        $this->setCount(count($this->collection));

        return $this;
    }
835681
public function addResult($child, $result) {
        if (!$result instanceof Result\ResultInterface) {
            throw new RuntimeException('Result type must be implements ResultInterface');
        }
        $this->results[$child - 1] = $result;
    }
518390
public function processColumnListing($results)
	{
		$mapping = function ($r) {
			$r = (object) $r;

			return $r->name;
		};

		return array_map($mapping, $results);
	}
787700
public function processColumnListing($results)
    {
        $mapping = function ($r) {
            $r = (object) $r;

            return $r->column_name;
        };

        return array_map($mapping, $results);
    }
644265
private static function treatment($result)
    {
        if (is_string($result)) {
            echo $result;
        } elseif ($result instanceof Views) {
            View::show($result);
        }
    }
1335237
public function generateNav ($result)
        {
            /**
             * @global object $navComponentObject
             */

            if ($this->arParams['DISPLAY_BOTTOM_PAGER'] === 'Y' || $this->arParams['DISPLAY_TOP_PAGER'] === 'Y')
            {
                $this->arResult['NAV_STRING'] = $result->GetPageNavStringEx (
                    $navComponentObject,
                    $this->arParams['PAGER_TITLE'],
                    $this->arParams['PAGER_TEMPLATE'],
                    $this->arParams['PAGER_SHOW_ALWAYS']
                );
                $this->arResult['NAV_CACHED_DATA'] = $navComponentObject->GetTemplateCachedData ();
                $this->arResult['NAV_RESULT'] = $result;
            }
        }