Skip to content

Latest commit

 

History

History
executable file
·
28 lines (19 loc) · 661 Bytes

README.md

File metadata and controls

executable file
·
28 lines (19 loc) · 661 Bytes

Dollar to Rial exchanger

Collect dollar rate from various sources like:

Installation

Simply enter composer require lostkoder/exchanger in terminal.

Quick Start

<?php

$provider = new \Exchanger\ProviderChain([
  new \Exchanger\Source\OXEProvider(),
  new \Exchanger\Source\IranjibProvider(),
  new \Exchanger\Source\TGJUProvider(),
]);

$rate = $provider->getRate();

Custom Rate Providers

Create a provider class which implements DollarToRialRateProvider interface and plug it in ProviderChain mentioned in quick start.