Skip to content

Instantly share code, notes, and snippets.

@springimport
Last active August 12, 2016 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save springimport/75b5769d3bbd4ed34caf9d16cfa9f14f to your computer and use it in GitHub Desktop.
Save springimport/75b5769d3bbd4ed34caf9d16cfa9f14f to your computer and use it in GitHub Desktop.
<?php
namespace App\Service\Factory;
use App\Service\Cache\UserFinderCache;
use App\Service\AR\ARUserFinder;
use PSR\Cache\CacheItemPoolInterface;
class UserFinderFactory
{
private $cache;
public function __construct(CacheItemPoolInterface $cache)
{
$this->cache = $cache;
}
public function create()
{
$model = new ARUserFinder;
return new UserFinderCache($model, $this->cache);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment