banker/src/Driver/DriverInterface.php

42 lines
970 B
PHP
Raw Normal View History

2016-08-31 12:18:46 -04:00
<?php
/**
* Cache
*
* A Caching library implementing psr/cache
*
* PHP version 5.6
*
* @package Cache
* @author Timothy J. Warren <tim@timshomepage.net>
* @copyright 2016 Timothy J. Warren
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @version 1.0.0
*/
namespace Aviat\Banker\Driver;
/**
* Interface for different cache backends
*/
interface DriverInterface {
/**
* Returns a Cache Item representing the specified key.
*
* This method must always return a CacheItemInterface object, even in case of
* a cache miss. It MUST NOT return null.
*
* @param string $key
* The key for which to return the corresponding Cache Item.
*
* @throws InvalidArgumentException
* If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException
* MUST be thrown.
*
* @return CacheItemInterface
* The corresponding Cache Item.
*/
public function getItem($key);
}