25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CurrencyPair.php 540 B

5 년 전
5 년 전
1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Utils\Money;
  4. class CurrencyPair
  5. {
  6. private Currency $base;
  7. private Currency $quote;
  8. public function __construct(Currency $base, Currency $quote)
  9. {
  10. $this->base = $base;
  11. $this->quote = $quote;
  12. }
  13. public function getBase(): Currency
  14. {
  15. return $this->base;
  16. }
  17. public function getQuote(): Currency
  18. {
  19. return $this->quote;
  20. }
  21. public function __toString()
  22. {
  23. return $this->base . '/' . $this->quote;
  24. }
  25. }