Skip to content
Snippets Groups Projects
Result.php 745 B
Newer Older
Pavel's avatar
Pavel committed
<?php

namespace IQDEV\Search;

Pavel's avatar
Pavel committed
use IQDEV\Search\Document\ProductCollection;
Pavel's avatar
Pavel committed
use IQDEV\Search\Facet\FacetCollection;

class Result
{
Pavel's avatar
Pavel committed
    private ProductCollection $products;
    private FacetCollection $facets;
    private int $total = 0;
Pavel's avatar
Pavel committed

    public function __construct()
    {
Pavel's avatar
Pavel committed
        $this->products = new ProductCollection();
Pavel's avatar
Pavel committed
        $this->facets = new FacetCollection();
    }
Pavel's avatar
Pavel committed

    public function setTotal(int $total): void
    {
        $this->total = $total;
    }

    public function getTotal(): int
    {
        return $this->total;
    }

    public function getProducts(): ProductCollection
    {
        return $this->products;
    }

    public function getFacets(): FacetCollection
    {
        return $this->facets;
    }
Pavel's avatar
Pavel committed
}