<?php

namespace DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\ProductTypes;

use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\Exception\ProductTypeException;
use ArrayObject;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\ProductTypes\SingleProductType;
/**
 * Class SingleProductTypesCollection.
 *
 * @package WPDesk\Library\DropshippingExport\ProductType;
 */
class SingleProductTypesCollection extends ArrayObject
{
    public function add_product_type(ProductType $product_type)
    {
        $this->offsetSet($product_type->get_type(), $product_type);
    }
    public function has_variable_type(): bool
    {
        return $this->offsetExists(SingleProductType::PRODUCT_TYPE_VARIABLE);
    }
    public function get_product_types(): array
    {
        return $this->getArrayCopy();
    }
}
