1 | <?php |
||
22 | class Cache implements Provider |
||
23 | { |
||
24 | /** |
||
25 | * @var Provider |
||
26 | */ |
||
27 | protected $provider; |
||
28 | |||
29 | /** |
||
30 | * @var PoolInterface |
||
31 | */ |
||
32 | protected $pool; |
||
33 | |||
34 | /** |
||
35 | * @param Provider $provider |
||
36 | */ |
||
37 | 4 | public function __construct(Provider $provider, PoolInterface $pool) |
|
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | 1 | public function shorten($url) |
|
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | 1 | public function expand($url) |
|
58 | |||
59 | /** |
||
60 | * Shorten or expand a URL checking it in the cache first |
||
61 | * |
||
62 | * @param string $url |
||
63 | * @param string $transformation |
||
64 | * |
||
65 | * @return string |
||
66 | */ |
||
67 | 2 | protected function transformUrl($url, $transformation) |
|
81 | } |
||
82 |