-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from aequasi/master
Adding chain factory, and allowing options to just be an indexed arra…
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of php-cache organization. | ||
* | ||
* (c) 2015-2015 Aaron Scherer <aequasi@gmail.com>, Tobias Nyholm <tobias.nyholm@gmail.com> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Cache\AdapterBundle\Factory; | ||
|
||
use Cache\Adapter\Chain\CachePoolChain; | ||
|
||
/** | ||
* @author Aaron Scherer <aequasi@gmail.com> | ||
*/ | ||
class ChainFactory extends AbstractAdapterFactory | ||
{ | ||
protected static $dependencies = [ | ||
['requiredClass' => 'Cache\Adapter\Chain\CachePoolChain', 'packageName' => 'cache/chain-adapter'], | ||
]; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getAdapter(array $config) | ||
{ | ||
return new CachePoolChain($config); | ||
} | ||
} |