public function exportIndex(
        Repository $repository,
        string $format
    ): string {
        $allItems = [];
        $iteration = 0;
        while (true) {
            $items = $repository
                ->query(Query::create('', $iteration, 10000))
                ->getItems();

            if (empty($items)) {
                break;
            }

            $allItems = array_merge(
                $allItems,
                $items
            );

            ++$iteration;
        }

        return $this
            ->exporterCollection
            ->getExporterByName($format)
            ->itemsToFormat($allItems);
    }
public function exportIndex(
        Repository $repository,
        string $format
    ): string {
        $allItems = [];
        $iteration = 0;
        while (true) {
            $items = $repository
                ->query(Query::create('', $iteration, 10000))
                ->getItems();

            if (empty($items)) {
                break;
            }

            $allItems = array_merge(
                $allItems,
                $items
            );

            ++$iteration;
        }

        return $this
            ->exporterCollection
            ->getExporterByName($format)
            ->itemsToFormat($allItems);
    }
public function exportIndex ( Repository $ repository , string $ format ) : string { $ allItems = [ ] ; $ iteration = 0 ; while ( true ) { $ items = $ repository -> query ( Query :: create ( '' , $ iteration , 10000 ) ) -> getItems ( ) ; if ( empty ( $ items ) ) { break ; } $ allItems = array_merge ( $ allItems , $ items ) ; ++ $ iteration ; } return $ this -> exporterCollection -> getExporterByName ( $ format ) -> itemsToFormat ( $ allItems ) ; }
Export index.

@param Repository $repository
@param string     $format

@return string
Export index .