| @@ 169-176 (lines=8) @@ | ||
| 166 | return $this; |
|
| 167 | } |
|
| 168 | ||
| 169 | protected function calculator() |
|
| 170 | { |
|
| 171 | if (!isset($this->_calculator)) { |
|
| 172 | $this->_calculator = Yii::createObject(ServerTariffCalculatorInterface::class, [[$this->tariff]]); |
|
| 173 | } |
|
| 174 | ||
| 175 | return $this->_calculator; |
|
| 176 | } |
|
| 177 | ||
| 178 | protected function parentCalculator() |
|
| 179 | { |
|
| @@ 178-185 (lines=8) @@ | ||
| 175 | return $this->_calculator; |
|
| 176 | } |
|
| 177 | ||
| 178 | protected function parentCalculator() |
|
| 179 | { |
|
| 180 | if (!isset($this->_parentCalculator)) { |
|
| 181 | $this->_parentCalculator = Yii::createObject(ServerTariffCalculatorInterface::class, [[$this->parentTariff]]); |
|
| 182 | } |
|
| 183 | ||
| 184 | return $this->_parentCalculator; |
|
| 185 | } |
|
| 186 | } |
|
| 187 | ||