Skip to content

Commit

Permalink
Release under new namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
DivineOmega committed Jul 12, 2018
1 parent 06d26a0 commit 57ef51b
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 21 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
vendor
composer.lock
composer.lock

.idea
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PSR-6 adapter for RW File Cache

[![Build Status](https://travis-ci.org/rapidwebltd/RW-File-Cache-PSR-6.svg?branch=master)](https://travis-ci.org/rapidwebltd/RW-File-Cache-PSR-6)
[![Coverage Status](https://coveralls.io/repos/github/rapidwebltd/RW-File-Cache-PSR-6/badge.svg?branch=master)](https://coveralls.io/github/rapidwebltd/RW-File-Cache-PSR-6?branch=master)
[![Build Status](https://travis-ci.org/DivineOmega/DO-File-Cache-PSR-6.svg?branch=master)](https://travis-ci.org/DivineOmega/DO-File-Cache-PSR-6)
[![Coverage Status](https://coveralls.io/repos/github/DivineOmega/DO-File-Cache-PSR-6/badge.svg?branch=master)](https://coveralls.io/github/DivineOmega/DO-File-Cache-PSR-6?branch=master)

This package provides a [PSR-6](http://www.php-fig.org/psr/psr-6/) adapter for [RW File Cache](https://github.com/rapidwebltd/RW-File-Cache).

Expand All @@ -10,5 +10,5 @@ This package provides a [PSR-6](http://www.php-fig.org/psr/psr-6/) adapter for [
You can install this package easily via Composer. Just run the following command from the root of your project.

```
composer require rapidwebltd/rw-file-cache-psr-6
composer require divineomega/do-file-cache-psr-6
```
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"name": "rapidwebltd/rw-file-cache-psr-6",
"name": "divineomega/do-file-cache-psr-6",
"description": "PSR-6 adapter for RW File Cache",
"type": "library",
"authors": [
{
"name": "Jordan Hall",
"email": "jordan[email protected]"
"email": "jordan@hall05.co.uk"
}
],
"license": "LGPL-3.0-only",
"require": {
"rapidwebltd/rw-file-cache": "^1.2.3",
"divineomega/do-file-cache": "^2.0.0",
"psr/cache": "^1.0"
},
"require-dev": {
"cache/integration-tests": "^0.16.0",
"phpunit/phpunit": "^5.7",
"satooshi/php-coveralls": "^2.0"
"php-coveralls/php-coveralls": "^2.1"
},
"autoload": {
"psr-4": {
"rapidweb\\RWFileCachePSR6\\": "src/"
"DivineOmega\\DOFileCachePSR6\\": "src/"
}
}
}
2 changes: 1 addition & 1 deletion src/CacheInvalidArgumentException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace rapidweb\RWFileCachePSR6;
namespace DivineOmega\DOFileCachePSR6;

use Psr\Cache\InvalidArgumentException;
use Exception;
Expand Down
2 changes: 1 addition & 1 deletion src/CacheItem.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace rapidweb\RWFileCachePSR6;
namespace DivineOmega\DOFileCachePSR6;

use Psr\Cache\CacheItemInterface;

Expand Down
18 changes: 9 additions & 9 deletions src/CacheItemPool.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<?php

namespace rapidweb\RWFileCachePSR6;
namespace DivineOmega\DOFileCachePSR6;

use Psr\Cache\CacheItemPoolInterface;
use rapidweb\RWFileCache\RWFileCache;
use DivineOmega\DOFileCache\DOFileCache;
use Psr\Cache\CacheItemInterface;

class CacheItemPool implements CacheItemPoolInterface
{
private $rwFileCache;
private $doFileCache;
private $deferredItems = [];

public function __construct()
{
$this->rwFileCache = new RWFileCache();
$this->doFileCache = new DOFileCache();
}

public function changeConfig(array $config)
{
return $this->rwFileCache->changeConfig($config);
return $this->doFileCache->changeConfig($config);
}

private function sanityCheckKey($key)
Expand All @@ -45,7 +45,7 @@ public function getItem($key)
return $this->deferredItems[$key];
}

return new CacheItem($key, $this->rwFileCache->get($key));
return new CacheItem($key, $this->doFileCache->get($key));
}

public function getItems(array $keys = [])
Expand All @@ -69,7 +69,7 @@ public function hasItem($key)
public function clear()
{
$this->deferredItems = [];
return $this->rwFileCache->flush();
return $this->doFileCache->flush();
}

public function deleteItem($key)
Expand All @@ -81,7 +81,7 @@ public function deleteItem($key)
return true;
}

$this->rwFileCache->delete($key);
$this->doFileCache->delete($key);

return true;
}
Expand All @@ -99,7 +99,7 @@ public function deleteItems(array $keys)

public function save(CacheItemInterface $item)
{
return $this->rwFileCache->set($item->getKey(), $item->get(), $item->getExpires());
return $this->doFileCache->set($item->getKey(), $item->get(), $item->getExpires());
}

public function saveDeferred(CacheItemInterface $item)
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/PoolIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use PHPUnit\Framework\TestCase;

use Cache\IntegrationTests\CachePoolTest;
use rapidweb\RWFileCachePSR6\CacheItemPool;
use DivineOmega\DOFileCachePSR6\CacheItemPool;

class PoolIntegrationTest extends CachePoolTest
{
Expand Down

0 comments on commit 57ef51b

Please sign in to comment.