1. Go to this page and download the library: Download kak/currency-converter library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace app\helpers\CacheAdapter;
use yii\base\Object;
use Yii;
class Cache Extends Object implements \kak\CurrencyConverter\ICache
{
public function contains($id)
{
return Yii::$app->cache->get($id);
}
public function fetch($id)
{
return Yii::$app->cache->get($id);
}
public function delete($id)
{
return Yii::$app->cache->delete($id);
}
public function flushAll()
{
return Yii::$app->cache->flush();
}
public function save($id, $data, $lifeTime = 0)
{
Yii::$app->cache->set($id,$data,$lifeTime);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.