src/Db/ImageBMapper.php
public function select(SelectionUnit $selectionUnit)
    {
        $ownerType = $selectionUnit->getType();

        $unit_number = $selectionUnit->getNumber();
        $key = 'unit_'.$unit_number;

        if(array_key_exists($key, $this->units))
        {
            return $this->units[$key];
        }

        //----------------------------------------------------------
        $imagesQuery = $this->imageQuerier->selectImagesByUnit($selectionUnit);
        $resizesQuery = $this->imageQuerier->selectResizesByUnit($selectionUnit);
        $cropsQuery = $this->imageQuerier->selectCropsByUnit($selectionUnit);

        $images_result = Helpers::laravel_db_result_to_array($imagesQuery->get());
        $resizes_result = Helpers::laravel_db_result_to_array($resizesQuery->get());
        $crops_result = Helpers::laravel_db_result_to_array($cropsQuery->get());

        $collection = $this->resultsToCollection($ownerType, $images_result, $resizes_result, $crops_result);

        $this->units[$key] = $collection;

        return $collection;
    }
public function select(SelectionUnit $selectionUnit)
    {
        $ownerType = $selectionUnit->getType();

        $unit_number = $selectionUnit->getNumber();
        $key = 'unit_'.$unit_number;

        if(array_key_exists($key, $this->units))
        {
            return $this->units[$key];
        }

        //----------------------------------------------------------
        $imagesQuery = $this->imageQuerier->selectImagesByUnit($selectionUnit);
        $resizesQuery = $this->imageQuerier->selectResizesByUnit($selectionUnit);
        $cropsQuery = $this->imageQuerier->selectCropsByUnit($selectionUnit);

        $images_result = Helpers::laravel_db_result_to_array($imagesQuery->get());
        $resizes_result = Helpers::laravel_db_result_to_array($resizesQuery->get());
        $crops_result = Helpers::laravel_db_result_to_array($cropsQuery->get());

        $collection = $this->resultsToCollection($ownerType, $images_result, $resizes_result, $crops_result);

        $this->units[$key] = $collection;

        return $collection;
    }
@param \Interpro\Extractor\Contracts\Selection\SelectionUnit $selectionUnit

@return \Interpro\Extractor\Contracts\Collections\MapBCollection