* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ namespace PrestaShop\PrestaShop\Core\Domain\Tax\Command; use PrestaShop\PrestaShop\Core\Domain\Tax\Exception\TaxException; use PrestaShop\PrestaShop\Core\Domain\Tax\ValueObject\TaxId; /** * Deletes taxes on bulk action */ class BulkDeleteTaxCommand { /** * @var array */ private $taxIds; /** * @param array $taxIds * * @throws TaxException */ public function __construct(array $taxIds) { $this->setTaxIds($taxIds); } /** * @return array */ public function getTaxIds() { return $this->taxIds; } /** * @param array $taxIds * * @throws TaxException */ private function setTaxIds(array $taxIds) { foreach ($taxIds as $taxId) { $this->taxIds[] = new TaxId((int) $taxId); } } }