lostkoder/exchanger

1.0.2 2017-11-25 06:26 UTC

This package is not auto-updated.

Last update: 2025-06-22 08:59:50 UTC


README

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.