2017 © Pedro Peláez
 

library currency-rate-cbr

Code for obtaining and parsing XML-data on currency rates of the Central Bank of the Russian Federation.

image

andydune/currency-rate-cbr

Code for obtaining and parsing XML-data on currency rates of the Central Bank of the Russian Federation.

  • Monday, July 2, 2018
  • by AndyDune
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Курсы валют ЦБ России

Build Status Software License Packagist Version Total Downloads, (*1)

Библиотека для получения и парсинга XML-данных о курсах валют., (*2)

Источник данных: Получение данных, используя XML, (*3)

Уставнока

Уставнока через композер:, (*4)

composer require andydune/currency-rate-cbr

Or if composer was not installed globally:, (*5)

php composer.phar require andydune/currency-rate-cbr

Or edit your composer.json:, (*6)

"require" : {
     "andydune/currency-rate-cbr": "^1"
}

Запустить команду:, (*7)

php composer.phar update

Использование

use AndyDune\CurrencyRateCbr\DailyRate;

$rate = new DailyRate();
$rate->setDate(new \DateTime()); // не обязательно - по умолчанию используется текущая дата 
$isOk = $rate->retrieve(); // true если данные успешно получены

// Извлекаем курс доллара 

/** @var DailyRateItem $item */
$item = $rate->get('usd'); // код валюты, регистр не важен

$item->getDate(); // \DateTime::class - объект даты
$item->getCharCode(); // код валюты: USD
$item->getValue(); // цена: 63,1394
$item->getNominal(); // номинал: 1
$item->getName(); // наименование: Доллар США
$item->getValueId(); // ID валюты: R01235
$item->getNumCode(); // числовой код: 208

The Versions

02/07 2018

dev-master

9999999-dev https://github.com/AndyDune/CurrencyRateCbr

Code for obtaining and parsing XML-data on currency rates of the Central Bank of the Russian Federation.

  Sources   Download

MIT

The Requires

 

The Development Requires

php

02/07 2018

v1.1.1

1.1.1.0 https://github.com/AndyDune/CurrencyRateCbr

Code for obtaining and parsing XML-data on currency rates of the Central Bank of the Russian Federation.

  Sources   Download

MIT

The Requires

 

The Development Requires

php

28/06 2018

v1.1.0

1.1.0.0 https://github.com/AndyDune/CurrencyRateCbr

Code for obtaining and parsing XML-data on currency rates of the Central Bank of the Russian Federation.

  Sources   Download

MIT

The Requires

 

The Development Requires

php

25/06 2018

v1.0.0

1.0.0.0 https://github.com/AndyDune/CurrencyRateCbr

Code for obtaining and parsing XML-data on currency rates of the Central Bank of the Russian Federation.

  Sources   Download

MIT

The Requires

 

The Development Requires

php