Service/Crud.php
public function readAll(Repository $repository, array $parameters = [])
    {
        $search = $repository->createSearch();
        $search->addQuery(new MatchAllQuery());

        if (isset($parameters['size'])) {
            $search->setSize($parameters['size']);
        }
        if (isset($parameters['from'])) {
            $search->setFrom($parameters['from']);
        }

        $results = $repository->execute($search, Result::RESULTS_ARRAY);

        if (!isset($results[0])) {
            return null;
        }

        return $results;
    }
public function readAll(Repository $repository, array $parameters = [])
    {
        $search = $repository->createSearch();
        $search->addQuery(new MatchAllQuery());

        if (isset($parameters['size'])) {
            $search->setSize($parameters['size']);
        }
        if (isset($parameters['from'])) {
            $search->setFrom($parameters['from']);
        }

        $results = $repository->execute($search, Result::RESULTS_ARRAY);

        if (!isset($results[0])) {
            return null;
        }

        return $results;
    }
{@inheritdoc}