|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
-
-
- namespace domain\Config\TaxRate;
-
- use domain\_\AbstractManager;
-
- class TaxRateManager extends AbstractManager
- {
- protected TaxRateBuilder $taxRateBuilder;
-
- public function loadDependencies(): void
- {
- $this->taxRateBuilder = $this->loadService(TaxRateBuilder::class);
- }
-
- public function createTaxRate(string $name, float $value): TaxRate
- {
- $taxRate = $this->taxRateBuilder->instanciateTaxRate();
- $taxRate->setName($name);
- $taxRate->setValue($value);
- $taxRate->save();
- return $taxRate;
- }
- }
|