for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* StashFactory.php
*
* @copyright More in license.md
* @license https://www.ipublikuj.eu
* @author Adam Kadlec <[email protected]>
* @package iPublikuj:Flysystem!
* @subpackage Cache
* @since 1.0.0
* @date 26.04.16
*/
declare(strict_types = 1);
namespace IPub\Flysystem\Factories\Cache;
use Nette\DI;
use Nette\Utils;
use League\Flysystem\Cached;
use Stash;
* Stash cache
class StashFactory
{
* @param Utils\ArrayHash $parameters
* @param DI\Container $container
* @return Cached\Storage\Stash
public static function create(Utils\ArrayHash $parameters, DI\Container $container) : Cached\Storage\Stash
/** @var Stash\Pool $pool */
$pool = $container->getService($parameters->pool);
return new Cached\Storage\Stash($pool, $parameters->key, $parameters->expires);
}