for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MidasSoft\DominicanBankParser\Cache;
class FileCacheDriver extends AbstractCacheDriver
{
/**
* The config of the driver.
*
* @var array
*/
protected $config = [
'path' => '',
'timezone' => 'America/Santo_Domingo',
];
* Creates a new FileCacheDriver instance.
* @param array $config
public function __construct(array $config)
$this->config = $config;
}
* {@inheritdoc}
public function add($key, $value)
$filename = sprintf('%s/%s.txt', $this->config['path'], $key);
$file = file_put_contents($filename, serialize($value));
$file
$this->keys[] = $key;
public function get($key)
return unserialize(file_get_contents($filename));
public function remove($key)
unlink(sprintf('%s/%s.txt', $this->config['path'], $key));