You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TaxRateManager.php 568B

5 kuukautta sitten
123456789101112131415161718192021222324
  1. <?php
  2. namespace domain\Config\TaxRate;
  3. use domain\_\AbstractManager;
  4. class TaxRateManager extends AbstractManager
  5. {
  6. protected TaxRateBuilder $taxRateBuilder;
  7. public function loadDependencies(): void
  8. {
  9. $this->taxRateBuilder = $this->loadService(TaxRateBuilder::class);
  10. }
  11. public function createTaxRate(string $name, float $value): TaxRate
  12. {
  13. $taxRate = $this->taxRateBuilder->instanciateTaxRate();
  14. $taxRate->setName($name);
  15. $taxRate->setValue($value);
  16. $taxRate->save();
  17. return $taxRate;
  18. }
  19. }